sqlite v1.0.0 Sqlite3Nif
Interact with the SqliteNif nif.
Every function in this module will throw a :nif_library_not_loaded
error if
the nif hasn’t been compiled/loaded.
Link to this section Summary
Types
Args when using bind/5
List of binding args
Database connection Resource. This isn’t a true reference
SQL data
Statement reference. This isn’t a true reference
Functions
Bind paramaters to a prepared statement
Get the number of affected rows of last statement
When the statement is executed Dest will receive message {Ref, answer()}
with answer :: integer | {:error, term}
Close the connection
Retrieve the column names of the prepared statement
Retrieve the column types of the prepared statement
Enable extension loading
Exec the query.
Sends an asynchronous exec command over the connection and returns
:ok
immediately.
When the statement is executed dest
will receive message {ref, answer}
with answer :: integer | {:error, term}
Finalize a statement
Insert record
Open the specified sqlite3 database
Prepare a statement
Reset a prepared statement
Start a low level thread which will can handle sqlite3 calls
Link to this section Types
Args when using bind/5
List of binding args.
Database connection Resource. This isn’t a true reference
.
SQL data.
Statement reference. This isn’t a true reference
.
Link to this section Functions
bind(connection(), statement(), reference(), pid(), bind_args()) :: :ok | error_tup2()
Bind paramaters to a prepared statement.
changes(connection(), reference(), pid()) :: :ok | error_tup2()
Get the number of affected rows of last statement
When the statement is executed Dest will receive message {Ref, answer()}
with answer :: integer | {:error, term}
close(connection(), reference(), pid()) :: :ok | error_tup2()
Close the connection.
column_names(connection(), statement(), reference(), pid()) :: :ok | error_tup2()
Retrieve the column names of the prepared statement
column_types(connection(), statement(), reference(), pid()) :: :ok | error_tup2()
Retrieve the column types of the prepared statement
enable_load_extension(connection(), reference(), pid()) :: :ok | error_tup2()
Enable extension loading.
exec(connection(), reference(), pid(), sql()) :: :ok | error_tup2()
Exec the query.
Sends an asynchronous exec command over the connection and returns
:ok
immediately.
When the statement is executed dest
will receive message {ref, answer}
with answer :: integer | {:error, term}
finalize(connection(), statement(), reference(), pid()) :: :ok | error_tup2()
Finalize a statement.
insert(connection(), reference(), pid(), sql()) :: :ok | error_tup2()
Insert record
multi_step(connection(), statement(), pos_integer(), reference(), pid()) :: :ok | error_tup2()
open(connection(), reference(), pid(), Path.t(), tuple()) :: :ok | error_tup2()
Open the specified sqlite3 database.
prepare(connection(), reference(), pid(), sql()) :: :ok | error_tup2()
Prepare a statement.
reset(connection(), statement(), reference(), pid()) :: :ok | error_tup2()
Reset a prepared statement.
Start a low level thread which will can handle sqlite3 calls.