correct the insert function spec
This commit is contained in:
@@ -202,13 +202,13 @@ exec(Sql, {connection, _Ref, Connection}, Timeout) ->
|
|||||||
|
|
||||||
%% @doc Insert records, returns the last rowid.
|
%% @doc Insert records, returns the last rowid.
|
||||||
%%
|
%%
|
||||||
%% @spec insert(iolist(), connection()) -> integer() | {error, error_message()}
|
%% @spec insert(iolist(), connection()) -> {ok, integer()} | {error, error_message()}
|
||||||
insert(Sql, Connection) ->
|
insert(Sql, Connection) ->
|
||||||
insert(Sql, Connection, ?DEFAULT_TIMEOUT).
|
insert(Sql, Connection, ?DEFAULT_TIMEOUT).
|
||||||
|
|
||||||
%% @doc Insert
|
%% @doc Insert
|
||||||
%%
|
%%
|
||||||
%% @spec insert(iolist(), connection(), timeout()) -> integer() | {error, error_message()}
|
%% @spec insert(iolist(), connection(), timeout()) -> {ok, integer()} | {error, error_message()}
|
||||||
insert(Sql, {connection, _Ref, Connection}, Timeout) ->
|
insert(Sql, {connection, _Ref, Connection}, Timeout) ->
|
||||||
Ref = make_ref(),
|
Ref = make_ref(),
|
||||||
ok = esqlite3_nif:insert(Connection, Ref, self(), Sql),
|
ok = esqlite3_nif:insert(Connection, Ref, self(), Sql),
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ close(_Db, _Ref, _Dest) ->
|
|||||||
|
|
||||||
%% @doc Insert record
|
%% @doc Insert record
|
||||||
%%
|
%%
|
||||||
%% @spec insert(connection(), Ref::reference(), Dest::pid(), string()) -> ok | {error, message()}
|
%% @spec insert(connection(), Ref::reference(), Dest::pid(), string()) -> {ok, integer()} | {error, message()}
|
||||||
insert(_Db, _Ref, _Dest, _Sql) ->
|
insert(_Db, _Ref, _Dest, _Sql) ->
|
||||||
exit(nif_library_not_loaded).
|
exit(nif_library_not_loaded).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user