Adding column names functionality

This commit is contained in:
Maas-Maarten Zeeman
2011-11-21 11:47:01 +01:00
parent 20b5d9cea1
commit e04da6dcc7
4 changed files with 83 additions and 5 deletions

View File

@@ -27,6 +27,7 @@
prepare/4,
step/3,
bind/4,
column_names/3,
close/3
]).
@@ -70,16 +71,22 @@ prepare(_Db, _Ref, _Dest, _Sql) ->
%% @doc
%%
%% @spec step(connection(), reference(), pid()) -> ok | {error, message()}
%% @spec step(statement(), reference(), pid()) -> ok | {error, message()}
step(_Stmt, _Ref, _Dest) ->
exit(nif_library_not_loaded).
%% @doc Bind parameters to a prepared statement.
%%
%% @spec bind(connection(), reference(), pid(), []) -> ok | {error, message()}
%% @spec bind(statement(), reference(), pid(), []) -> ok | {error, message()}
bind(_Stmt, _Ref, _Dest, _Args) ->
exit(nif_library_not_loaded).
%% @doc Retrieve the column names of the prepared statement
%%
%% @spec column_names(statement(), reference(), pid()) -> {ok, tuple()} | {error, message()}
column_names(_Stmt, _Ref, _Dest) ->
exit(nif_library_not_loaded).
%% @doc Close the connection.
%%
%% @spec close(connection(), reference(), pid()) -> ok | {error, message()}