Simple SQL statements that don't need any additional values are executed by calling
sql:exec(…).
SQL statements that need external values must be prepared with sql:prepare(), followed
by zero or more sql:bind() calls. Finally, a prepared statement is executed with a plain
sql:exec() with no arguments.
To run the same SQL statement again, a query can be "rewound" by calling sql:reset(). After a
successful reset, the query can be executed again. If necessary, new values can be attached with new calls to
sql:bind() before the query is repeated. Repeating a query in that way saves the time needed to
parse the SQL statement.
Results of a SELECT statement are retrieved by repeatedly calling sql:next() until it
returns false. Each call will make the next row of the result set available. The values are
retrieved with sql:value().
A database can be backed up into another database with the backup API, see sql.backupInit().
A backup can run concurrently to the normal database operation.