Module esqlite3_nif

Low level erlang API for sqlite3 databases.

Copyright © 2011 - 2017 Maas-Maarten Zeeman

Authors: Maas-Maarten Zeeman (mmzeeman@xs4all.nl).

Description

Low level erlang API for sqlite3 databases

Function Index

bind/5Bind parameters to a prepared statement.
changes/3Get the number of affected rows of last statement.
close/3Close the connection.
column_names/4Retrieve the column names of the prepared statement.
column_types/4Retrieve the column types of the prepared statement.
exec/4Exec the query.
finalize/4.
get_autocommit/3Get automcommit.
insert/4Insert record.
multi_step/5.
open/4Open the specified sqlite3 database.
prepare/4.
reset/4.
set_update_hook/4
start/0Start a low level thread which will can handle sqlite3 calls.

Function Details

bind/5

bind(Db::esqlite:connection(), Stmt::esqlite:statement(), Ref::reference(), Dest::pid(), Args::[any()]) -> ok | {error, any()}

Bind parameters to a prepared statement.

changes/3

changes(Db, Ref, Dest) -> any()

Get the number of affected rows of last statement

When the statement is executed Dest will receive message {Ref, answer()} with answer() integer | {error, reason()}

close/3

close(Db::esqlite:connection(), Ref::reference(), Dest::pid()) -> ok | {error, any()}

Close the connection.

column_names/4

column_names(Db::esqlite:connection(), Stmt::esqlite:statement(), Ref::reference(), Dest::pid()) -> ok | {error, any()}

Retrieve the column names of the prepared statement

column_types/4

column_types(Db::esqlite:connection(), Stmt::esqlite:statement(), Ref::reference(), Dest::pid()) -> ok | {error, any()}

Retrieve the column types of the prepared statement

exec/4

exec(Db::esqlite:connection(), Ref::reference(), Dest::pid(), Sql::string()) -> ok | {error, any()}

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, reason()}

finalize/4

finalize(Db::esqlite:connection(), Stmt::esqlite:statement(), Ref::reference(), Dest::pid()) -> ok | {error, any()}

get_autocommit/3

get_autocommit(Db::esqlite:connection(), Ref::reference(), Dest::pid()) -> ok | {error, any()}

Get automcommit

insert/4

insert(Db::esqlite:connection(), Ref::reference(), Dest::pid(), Sql::esqlite:sql()) -> ok | {error, any()}

Insert record

multi_step/5

multi_step(Db::esqlite:connection(), Stmt::esqlite:statement(), Chunk_Size::pos_integer(), Ref::reference(), Dest::pid()) -> ok | {error, any()}

open/4

open(Db::esqlite:connection(), Ref::reference(), Dest::pid(), Filename::string()) -> ok | {error, any()}

Open the specified sqlite3 database.

Sends an asynchronous open command over the connection and returns ok immediately. When the database is opened

prepare/4

prepare(Db::esqlite:connection(), Ref::reference(), Dest::pid(), Sql::string()) -> ok | {error, any()}

reset/4

reset(Db::esqlite:connection(), Stmt::esqlite:statement(), Ref::reference(), Dest::pid()) -> ok | {error, any()}

set_update_hook/4

set_update_hook(Db, Ref, Dest, Pid) -> any()

start/0

start() -> {ok, esqlite:connection()} | {error, any()}

Start a low level thread which will can handle sqlite3 calls.


Generated by EDoc