rspamd_sqlite3
This module provides routines to query sqlite3 databases
Functions:
Function | Description |
---|---|
rspamd_sqlite3.open(path) |
Opens sqlite3 database at the specified path. |
rspamd_sqlite3:sql(query[, args..]) |
Performs sqlite3 query replacing ‘?1’, ‘?2’ and so on with the subsequent args. |
rspamd_sqlite3:rows(query[, args..]) |
Performs sqlite3 query replacing ‘?1’, ‘?2’ and so on with the subsequent args. |
The module rspamd_sqlite3
defines the following functions.
rspamd_sqlite3.open(path)
Opens sqlite3 database at the specified path. DB is created if not exists.
Parameters:
path {string}
: path to dbReturns:
{sqlite3}
: sqlite3 handleBack to module description.
rspamd_sqlite3:sql(query[, args..])
Performs sqlite3 query replacing ‘?1’, ‘?2’ and so on with the subsequent args of the function
Parameters:
query {string}
: SQL queryargs... {string|number}
: variable number of argumentsReturns:
{boolean}
: true
if a statement has been successfully executedBack to module description.
rspamd_sqlite3:rows(query[, args..])
Performs sqlite3 query replacing ‘?1’, ‘?2’ and so on with the subsequent args of the function. This function returns iterator suitable for loop construction:
Parameters:
query {string}
: SQL queryargs... {string|number}
: variable number of argumentsReturns:
{function}
: iterator to get all rowsBack to module description.
Back to top.