Copyright © 2011 - 2022 Maas-Maarten Zeeman
Authors: Maas-Maarten Zeeman (mmzeeman@xs4all.nl).
cell() = esqlite3_nif:cell()
error() = esqlite3_nif:error()
esqlite3() = #esqlite3{db = esqlite3_nif:esqlite3_ref()}
esqlite3_backup() = #esqlite3_backup{backup = esqlite3_nif:esqlite3_backup_ref()}
esqlite3_stmt() = #esqlite3_stmt{stmt = esqlite3_nif:esqlite3_stmt_ref()}
prepare_flags() = persistent | no_vtab
row() = esqlite3_nif:row()
rowid() = esqlite3_nif:rowid()
sql() = esqlite3_nif:sql()
stats() = #{used := non_neg_integer(), highwater := non_neg_integer()}
status_info() = #{memory_used => stats(), pagecache_used => stats(), pagecache_overflow => stats(), malloc_size := stats(), parser_stack := stats(), pagecache_size := stats(), malloc_count := stats()}
| backup_finish/1 | Release the resources held by the backup. |
| backup_init/4 | Initialize a backup procedure. |
| backup_pagecount/1 | Get the remaining number of pages which need to be backed up. |
| backup_remaining/1 | Get the remaining number of pages which need to be backed up. |
| backup_step/2 | Do a backup step. |
| bind/2 | Bind an array of values as parameters of a prepared statement. |
| bind_blob/3 | |
| bind_double/3 | |
| bind_int/3 | |
| bind_int64/3 | |
| bind_null/2 | |
| bind_text/3 | |
| changes/1 | Get the number of changes in the most recent INSERT, UPDATE or DELETE. |
| close/1 | Close the database. |
| column_decltypes/1 | Return the column types of the prepared statement. |
| column_names/1 | Return the column names of the prepared statement. |
| error_info/1 | Return a description of the last occurred error. |
| exec/2 | Compile a SQL statement. |
| fetchall/1 | Fetch all rows from the prepared statement. |
| get_autocommit/1 | Check if the connection is in auto-commit mode. |
| interrupt/1 | Interrupt a long running query. |
| last_insert_rowid/1 | Get the last inserted rowid. |
| open/1 | Opens a sqlite3 database mentioned in Filename. |
| prepare/2 | Compile a SQL statement. |
| prepare/3 | Compile a SQL statement. |
| q/2 | Execute a sql statement, returns the result as list rows. |
| q/3 | Execute statement, bind args and return a list rows. |
| reset/1 | Reset the prepared statement. |
| set_update_hook/2 | Subscribe to database notifications. |
| status/0 | Get all internal status information from sqlite. |
| status/1 | Specify which internal status information you need, when true
is passed, the highwater information from the status information
will be reset. |
| status/2 | |
| step/1 |
Release the resources held by the backup.
backup_init(Esqlite3::esqlite3(), DestName::iodata(), X3::esqlite3(), SrcName::iodata()) -> {ok, esqlite3_backup()} | {error, term()}
Initialize a backup procedure.
See https://sqlite.org/backup.html for more details on the backup api.
Get the remaining number of pages which need to be backed up.
Get the remaining number of pages which need to be backed up.
backup_step(Esqlite3_backup::esqlite3_backup(), NPage::integer()) -> ok | '$done' | error()
Do a backup step.
bind(Statement, Args) -> Result
Statement = esqlite3_stmt()Args = list() | map()Result = ok | {error, term()}
Bind an array of values as parameters of a prepared statement
bind_blob(Statement, Index, Value) -> BindResult
Statement = esqlite3_stmt()Index = integer()Value = iodata()BindResult = ok | error()
bind_double(Statement, Index, Value) -> BindResult
Statement = esqlite3_stmt()Index = integer()Value = float()BindResult = ok | error()
bind_int(Statement, Index, Value) -> BindResult
Statement = esqlite3_stmt()Index = integer()Value = integer()BindResult = ok | error()
bind_int64(Statement, Index, Value) -> BindResult
Statement = esqlite3_stmt()Index = non_neg_integer()Value = integer()BindResult = ok | error()
bind_null(Statement, Index) -> BindResult
Statement = esqlite3_stmt()Index = integer()BindResult = ok | error()
bind_text(Statement, Index, Value) -> BindResult
Statement = esqlite3_stmt()Index = integer()Value = iodata()BindResult = ok | error()
Get the number of changes in the most recent INSERT, UPDATE or DELETE.
See https://sqlite.org/c3ref/changes.html for more details.
Close the database
Return the column types of the prepared statement.
Return the column names of the prepared statement.
Return a description of the last occurred error.
Compile a SQL statement. Returns a cached compiled statement which can be used in queries.
Fetch all rows from the prepared statement.
get_autocommit(Connection) -> AutocommitResult
Connection = esqlite3()AutocommitResult = true | false
Check if the connection is in auto-commit mode.
See: https://sqlite.org/c3ref/get_autocommit.html for more details.
Interrupt a long running query. See https://sqlite.org/c3ref/interrupt.html for more details.
Get the last inserted rowid.
See https://sqlite.org/c3ref/set_last_insert_rowid.html for more details.
Opens a sqlite3 database mentioned in Filename.
The standard supplied sqlite3 library supports uri filenames, which makes
it possible to open the connection to the database in read-only mode. More
information about this can be found here: https://sqlite.org/uri.html
Example:
open("file:data.db")
Opens "data.db" in the current working directory
open("file:data.db?mode=ro&cache=private")
Opens "data.db" in read only mode with a private cache
open("file:memdb1?mode=memory&cache=shared")
Opens a shared memory database named memdb1 with a shared cache.
prepare(Connection, Sql) -> PrepareResult
Connection = esqlite3()Sql = sql()PrepareResult = {ok, esqlite3_stmt()} | error()
Compile a SQL statement. Returns a cached compiled statement which can be used in queries.
prepare(Connection, Sql, PrepareFlags) -> PrepareResult
Connection = esqlite3()Sql = sql()PrepareFlags = [prepare_flags()]PrepareResult = {ok, esqlite3_stmt()} | {error, term()}
Compile a SQL statement. Returns a cached compiled statement which can be used in queries.
Execute a sql statement, returns the result as list rows.
q(Connection, Sql, Args) -> Result
Connection = esqlite3()Sql = sql()Args = list()Result = [row()] | error()
Execute statement, bind args and return a list rows.
Reset the prepared statement.
Subscribe to database notifications. When rows are inserted deleted or updates, the registered process will receive messages:
{insert, binary(), binary(), rowid()}
When a new row has been inserted.
{delete, binary(), binary(), rowid()}
When a new row has been deleted.
{update, binary(), binary(), rowid()}
When a row has been updated.
Get all internal status information from sqlite.
status(ArgsOrResetHighWater) -> Status
ArgsOrResetHighWater = [atom()] | boolean()Status = status_info()
Specify which internal status information you need, when true
is passed, the highwater information from the status information
will be reset.
status(Args, ResetHighWater) -> any()
Generated by EDoc