get column types
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
fetchone/1,
|
||||
fetchall/1,
|
||||
column_names/1, column_names/2,
|
||||
column_types/1, column_types/2,
|
||||
close/1, close/2]).
|
||||
|
||||
-export([q/2, q/3, map/3, foreach/3]).
|
||||
@@ -305,6 +306,18 @@ column_names(Stmt, Timeout) ->
|
||||
ok = esqlite3_nif:column_names(Stmt, Ref, self()),
|
||||
receive_answer(Ref, Timeout).
|
||||
|
||||
%% @doc Return the column types of the prepared statement.
|
||||
%%
|
||||
-spec column_types(statement()) -> tuple(atom()).
|
||||
column_types(Stmt) ->
|
||||
column_types(Stmt, ?DEFAULT_TIMEOUT).
|
||||
|
||||
-spec column_types(statement(), timeout()) -> tuple(atom()).
|
||||
column_types(Stmt, Timeout) ->
|
||||
Ref = make_ref(),
|
||||
ok = esqlite3_nif:column_types(Stmt, Ref, self()),
|
||||
receive_answer(Ref, Timeout).
|
||||
|
||||
%% @doc Close the database
|
||||
%%
|
||||
%% @spec close(connection()) -> ok | {error, error_message()}
|
||||
|
||||
Reference in New Issue
Block a user