anchor.diff:              lists:reverse(Acc);
           {error, _} = E ->
               E
  +    end.
  +
  +%% @doc Get the last inserted rowid.
  +%%      See [https://sqlite.org/c3ref/set_last_insert_rowid.html] for more details.
  +-spec last_insert_rowid(Connection) -> RowidResult when
  +      Connection :: esqlite3(),
  +      RowidResult :: integer() | {error, closed}.
  +last_insert_rowid(#esqlite3{db=Connection}) ->
  +    esqlite3_nif:last_insert_rowid(Connection).
  +
  +%% @doc Get the number of changes in the most recent INSERT, UPDATE or DELETE.
  +%%      See [https://sqlite.org/c3ref/changes.html] for more details.
  +-spec changes(Connection) -> ChangesResult
  +    when Connection :: esqlite3(),
  +         ChangesResult :: integer() | {error, closed}.
  +changes(#esqlite3{db=Connection}) ->
  +    esqlite3_nif:changes(Connection).
  +
  +
  +%% @doc Check if the connection is in auto-commit mode.
  +%%      See: [https://sqlite.org/c3ref/get_autocommit.html] for more details.
  +%%
  +-spec get_autocommit(Connection) -> AutocommitResult
  +    when Connection :: esqlite3(),
  +         AutocommitResult ::  true | false | {error, closed}.
  +get_autocommit(#esqlite3{db=Connection}) ->
  +    esqlite3_nif:get_autocommit(Connection).
  +
  +%% @doc Compile a SQL statement. Returns a cached compiled statement which can be used in
  +%% queries.
  +%%
  +-spec exec(Connection, Sql) -> ExecResult
  +    when Connection :: esqlite3(),
  +         Sql ::  sql(),
  +         ExecResult :: ok | {error, _}.
  +exec(#esqlite3{db=Connection}, Sql) ->
  +    esqlite3_nif:exec(Connection, Sql).
  +
  +%%
  +%% Prepared Statements
  +%%
  +
  +%% @doc Compile a SQL statement. Returns a cached compiled statement which can be used in
  +%% queries.
  +%%
  +-spec prepare(Connection, Sql) -> PrepareResult
  +    when Connection :: esqlite3(),
  +         Sql ::  sql(),
  +         PrepareResult :: {ok, esqlite3_stmt()} | {error, _}.
  +prepare(Connection, Sql) ->
  +    prepare(Connection, Sql, []).
  +
  +%% @doc Compile a SQL statement. Returns a cached compiled statement which can be used in
  +%% queries.
  +-spec prepare(Connection, Sql, PrepareFlags) -> PrepareResult when
  +      Connection :: esqlite3(),
  +      Sql ::  sql(),
  +      PrepareFlags :: list(prepare_flags()),
  +      PrepareResult :: {ok, esqlite3_stmt()} | {error, _}.
  +prepare(#esqlite3{db=Connection}, Sql, PrepareFlags) ->
  +    case esqlite3_nif:prepare(Connection, Sql, props_to_prepare_flag(PrepareFlags)) of
  +        {ok, Stmt} ->
  +            {ok, #esqlite3_stmt{stmt=Stmt}};
  +        {error, _}=Error ->
  +            Error
       end.
   
   %% @doc Bind an array of values to a prepared statement
  
positive.code:     esqlite3_nif:interrupt(Db).
  
  %% @doc Subscribe to database notifications. When rows are inserted deleted
  %% or updates, the process will receive messages:
  %% ```{insert, binary(), binary(), rowid()}'''
  %% When a new row has been inserted.
  %% ```{delete, binary(), binary(), rowid()}''' 
  
negative.code:         {error, _Msg}=Error ->
              Error
      end;
  q(Connection, Sql, Args) ->
      case prepare(Connection, Sql) of
          {ok, Statement} ->
  