![]() |
ArkScript
A small, fast, functional and scripting language for video games
|
Open a connection to a SQLite database.
Parameters
database_filename
: path to the database fileReturn value UserType
: an open connection to a SQLite database
Author
Example
Close an open connection to a SQLite database.
Parameters
database
: an open SQLite database objectReturn value number
: SQLite exit code (0 on success).
Author
Example
Execute a SQL query.
Parameters
database
: an open SQLite database objectsql
: SQL statement(s)Return value number
: SQLite exit code (0 on success).
Author
Example
Run a SQL statement on the database and run a callback function on each row in the results. The callback function takes one argument which will be passed a list of the results from a row.
Parameters
database
: SQLite Objectsql
: a string of the query or queries that you'd like to runcallback
: a function to run on every row returnedReturn value number
: SQLite exit code.
Author
Example
Get the row id of the last row inserted into the database.
Parameters
database
: SQLite ObjectReturn value number
: id of the last row inserted
Author
Example