Copyright © 2011 - 2017 Maas-Maarten Zeeman
Authors: Maas-Maarten Zeeman (mmzeeman@xs4all.nl).
connection() = {connection, reference(), term()}
sql() = iodata()
statement() = {statement, term(), connection()}
bind/2 | Bind values to prepared statements. |
bind/3 | Bind values to prepared statements. |
changes/1 | Return the number of affected rows of last statement. |
changes/2 | Return the number of affected rows of last statement. |
close/1 | Close the database. |
close/2 | Close the database. |
column_names/1 | Return the column names of the prepared statement. |
column_names/2 | |
column_types/1 | Return the column types of the prepared statement. |
column_types/2 | |
exec/2 | Execute Sql statement, returns the number of affected rows. |
exec/3 | Execute. |
fetchall/1 | Fetch all records. |
fetchall/2 | Fetch all records. |
fetchall/3 | Fetch all records. |
fetchone/1 | |
foreach/3 | |
get_autocommit/1 | Get autocommit. |
get_autocommit/2 | |
insert/2 | Insert records, returns the last rowid. |
map/3 | |
open/1 | Opens a sqlite3 database mentioned in Filename. |
open/2 | Open a database connection. |
open_encrypted/2 | Opens an encrypted sqlcipher database connection. |
open_encrypted/3 | Open a database connection to an encrypted database. |
prepare/2 | Prepare a statement. |
prepare/3 | . |
q/2 | Execute a sql statement, returns a list with tuples. |
q/3 | Execute statement, bind args and return a list with tuples as result. |
q/4 | Execute statement, bind args and return a list with tuples as result restricted by timeout. |
rekey/2 | Change database password. |
rekey/3 | Change database password. |
reset/1 | Reset the prepared statement back to its initial state. |
set_update_hook/2 | Subscribe to database notifications Messages will come in the shape {action, table, id} Where action will be insert | update | delete and table will be a string and id will be an integer. |
set_update_hook/3 | |
step/1 | Step. |
step/2 | . |
bind(Stmt::prepared_statement(), Args::value_list()) -> ok | {error, error_message()}
Bind values to prepared statements
bind(X1::prepared_statement(), Args::[], Timeout::timeout()) -> ok | {error, error_message()}
Bind values to prepared statements
changes(Connection) -> any()
Return the number of affected rows of last statement.
changes(X1, Timeout) -> any()
Return the number of affected rows of last statement.
close(Connection::connection()) -> ok | {error, error_message()}
Close the database
close(X1::connection(), Timeout::integer()) -> ok | {error, error_message()}
Close the database
column_names(Stmt::statement()) -> {atom()}
Return the column names of the prepared statement.
column_names(X1::statement(), Timeout::timeout()) -> {atom()}
column_types(Stmt::statement()) -> {atom()}
Return the column types of the prepared statement.
column_types(X1::statement(), Timeout::timeout()) -> {atom()}
exec(Sql::iolist(), Connection::connection()) -> integer() | {error, error_message()}
Execute Sql statement, returns the number of affected rows.
exec(Sql::iolist(), Params::connection(), Timeout::timeout()) -> integer() | {error, error_message()}
Execute
fetchall(Statement::statement()) -> [tuple()] | {error, term()}
Statement: is prepared sql statement
Fetch all records
fetchall(Statement::statement(), ChunkSize::pos_integer()) -> [tuple()] | {error, term()}
Statement: is prepared sql statement
ChunkSize: is a count of rows to read from sqlite and send to erlang process in one bulk.
Decrease this value if rows are heavy. Default value is 5000 (DEFAULT_CHUNK_SIZE).
Fetch all records
fetchall(Statement::statement(), ChunkSize::pos_integer(), Timeout::timeout()) -> [tuple()] | {error, term()}
Statement: is prepared sql statement
ChunkSize: is a count of rows to read from sqlite and send to erlang process in one bulk.
Decrease this value if rows are heavy. Default value is 5000 (DEFAULT_CHUNK_SIZE).
Timeout: is timeout per each request of the one bulk
Fetch all records
fetchone(Statement) -> any()
foreach(F, Sql::sql(), Connection::connection()) -> ok
get_autocommit(Connection::connection) -> true | false
Get autocommit
get_autocommit(X1, Timeout) -> any()
insert(Sql::iolist(), Connection::connection()) -> {ok, integer()} | {error, error_message()}
Insert records, returns the last rowid.
map(F, Sql::sql(), Connection::connection()) -> [Type]
Opens a sqlite3 database mentioned in Filename.
Open a database connection
open_encrypted(Filename, Password) -> {ok, connection()} | {error, term()}
Opens an encrypted sqlcipher database connection
open_encrypted(Filename, Password, Timeout::timeout()) -> {ok, connection()} | {error, term()}
Open a database connection to an encrypted database
prepare(Sql::iolist(), Connection::connection()) -> {ok, prepared_statement()} | {error, error_message()}
Prepare a statement
prepare(Sql, C, Timeout) -> any()
q(Sql::sql(), Connection::connection()) -> [tuple()] | {error, term()}
Execute a sql statement, returns a list with tuples.
q(Sql::sql(), Args::list(), Connection::connection()) -> [tuple()] | {error, term()}
Execute statement, bind args and return a list with tuples as result.
q(Sql::sql(), Args::list(), Connection::connection(), Timeout::timeout()) -> [tuple()] | {error, term()}
Execute statement, bind args and return a list with tuples as result restricted by timeout.
Change database password
Change database password
reset(X1::prepared_statement()) -> ok | {error, error_message()}
Reset the prepared statement back to its initial state.
set_update_hook(Pid::pid(), Connection::connection()) -> ok | {error, term()}
Subscribe to database notifications Messages will come in the shape {action, table, id} Where action will be insert | update | delete and table will be a string and id will be an integer
set_update_hook(Pid::pid(), X2::connection(), Timeout::timeout()) -> ok | {error, term()}
step(Stmt::prepared_statement()) -> tuple()
Step
step(X1::prepared_statement(), Timeout::timeout()) -> tuple()
Generated by EDoc