SQLiteQuery
Inherits: RefCounted < Object
Class for executing SQL queries on an SQLite database.
Description
A class that allows you to execute SQL queries on an SQLite database. It provides methods for both single and batch execution of queries. It also provides a method to retrieve the column names from the last executed query and a method to get the last error message, if any.
Properties
|
||
|
Methods
batch_execute(rows: Array) |
|
void |
|
get_last_error_message() const |
|
get_stmt_status(op: int, reset: bool = false) |
|
is_ready() const |
Property Descriptions
Arguments for the query.
String get_query()
The query executed.
Method Descriptions
Array[SQLiteQueryResult] batch_execute(rows: Array) 🔗
Executes a batch of SQL queries. The queries are provided as an array of strings. Returns the result of the last query in the batch.
SQLiteQueryResult execute(arguments: Variant = null) 🔗
Executes a single SQL query. The query is provided as a string. If the query requires arguments, they can be provided as an array. Returns the result of the query.
void finalize_query() 🔗
Finalizes and cleans up the prepared query statement.
Array[SQLiteColumnSchema] get_columns() 🔗
Returns an array of column names from the last executed query.
String get_last_error_message() const 🔗
Returns the last error message, if any. If there was no error, returns an empty string.
int get_stmt_status(op: int, reset: bool = false) 🔗
Returns the current value of a statement status counter identified by op.
These counters track how many times specific operations were performed by the prepared statement and can be used to analyze its performance characteristics.
If reset is true, the selected counter is reset to zero after its value is retrieved. Otherwise, the counter value is left unchanged.
Returns true if the statement is prepared.