Re-enabled a lot of tests

This commit is contained in:
Maas-Maarten Zeeman
2022-05-21 22:00:54 +02:00
parent 7913ec08c9
commit 0e45e9bea4
4 changed files with 165 additions and 110 deletions

View File

@@ -28,6 +28,7 @@
% set_update_hook/2, set_update_hook/3,
exec/2,
prepare/2,
prepare/3,
@@ -45,7 +46,6 @@
step/1,
reset/1
% exec/2, exec/3, exec/4,
% insert/2, insert/3,
%
% fetchone/1,
@@ -391,6 +391,17 @@ changes(#esqlite3{db=Connection}) ->
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).
%% @doc Compile a SQL statement. Returns a cached compiled statement which can be used in
%% queries.
%%
@@ -476,8 +487,6 @@ column_names(#esqlite3_stmt{stmt=Stmt}) ->
column_decltypes(#esqlite3_stmt{stmt=Stmt}) ->
esqlite3_nif:column_decltypes(Stmt).
%%
%% Backup API
%%

View File

@@ -27,6 +27,7 @@
last_insert_rowid/1,
changes/1,
exec/2,
prepare/3,
column_names/1,
@@ -97,6 +98,16 @@ open(_Filename) ->
close(_Db) ->
erlang:nif_error(nif_library_not_loaded).
%% @doc Execute a sql statement
%%
-spec exec(Connection, Sql) -> ExecResult
when Connection :: esqlite3(),
Sql :: sql(),
ExecResult :: ok | {error, _}.
exec(_Connection, _Sql) ->
erlang:nif_error(nif_library_not_loaded).
%% @doc Compile a sql statement.
%%
-spec prepare(Connection, Sql, PrepareFlags) -> PrepareResult