From f7c2d15e515db8842735f4f4c426edb26364062b Mon Sep 17 00:00:00 2001 From: Maas-Maarten Zeeman Date: Mon, 7 Nov 2011 22:18:23 +0100 Subject: [PATCH] Added travis --- .travis.yml | 2 ++ src/esqlite3_nif.erl | 30 ++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..913b921 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,2 @@ +language: erlang +script: "rebar compile eunit" diff --git a/src/esqlite3_nif.erl b/src/esqlite3_nif.erl index 30ae2c5..b473028 100644 --- a/src/esqlite3_nif.erl +++ b/src/esqlite3_nif.erl @@ -41,38 +41,48 @@ init() -> start() -> exit(nif_library_not_loaded). -%% @doc Open a connection to +%% @doc Open the specified sqlite3 database. +%% +%% Sends an asynchronous open command over the connection and returns +%% ok immediately. When the database is opened %% -%% @spec open(connection(), reference(), pid(), string()) -> ok +%% @spec open(connection(), reference(), pid(), string()) -> ok | {error, message()} open(_Db, _Ref, _Dest, _Filename) -> exit(nif_library_not_loaded). -%% @doc +%% @doc Exec the query. +%% +%% Sends an asynchronous exec command over the connection and returns +%% ok immediately. %% -%% @spec exec(connection(), reference(), pid(), string()) -> ok +%% When the statement is executed Dest will receive message {Ref, answer()} +%% with answer() integer | {error, reason()} +%% +%% @spec exec(connection(), Ref::reference(), Dest::pid(), string()) -> ok | {error, message()} exec(_Db, _Ref, _Dest, _Sql) -> exit(nif_library_not_loaded). %% @doc %% -%% @spec prepare(connection(), reference(), pid(), string()) -> ok +%% @spec prepare(connection(), reference(), pid(), string()) -> ok | {error, message()} prepare(_Db, _Ref, _Dest, _Sql) -> exit(nif_library_not_loaded). %% @doc %% -%% @spec step(connection(), reference(), pid()) -> ok +%% @spec step(connection(), reference(), pid()) -> ok | {error, message()} step(_Stmt, _Ref, _Dest) -> exit(nif_library_not_loaded). -%% @doc -%% @spec bind(connection(), reference(), pid(), []) -> ok +%% @doc Bind parameters to a prepared statement. +%% +%% @spec bind(connection(), reference(), pid(), []) -> ok | {error, message()} bind(_Stmt, _Ref, _Dest, _Args) -> exit(nif_library_not_loaded). -%% @doc +%% @doc Close the connection. %% -%% @spec close(connection(), reference(), pid()) -> ok +%% @spec close(connection(), reference(), pid()) -> ok | {error, message()} close(_Db, _Ref, _Dest) -> exit(nif_library_not_loaded).