Up to date
This page is up to date for Godot 4.3
.
If you still find outdated information, please open an issue.
SQLiteAccessΒΆ
Inherits: RefCounted < Object
Wrapper class for SQLite databases.
DescriptionΒΆ
A wrapper class that lets you perform SQL statements on an SQLite database file.
For queries that involve arbitrary user input, you should use methods that end in *_with_args
, as these protect against SQL injection.
MethodsΒΆ
close() |
|
create_query(statement: String, arguments: Array = []) |
|
get_last_error_code() const |
|
get_last_error_message() const |
|
open_buffered(path: String, buffers: PackedByteArray, size: int) |
|
Method DescriptionsΒΆ
bool backup(path: String) π
Creates a backup of the database at the given path.
Closes the database handle.
SQLiteQuery create_query(statement: String, arguments: Array = []) π
Creates a new query object.
int get_last_error_code() const π
Gets the last error code.
String get_last_error_message() const π
Gets the last error message.
bool open(database: String) π
Opens the database file at the given path. Returns true
if the database was successfully opened, false
otherwise.
If the path starts with "res://", it will use open_buffered implicitly.
bool open_buffered(path: String, buffers: PackedByteArray, size: int) π
Opens a temporary database with the data in buffer
. Used for opening databases stored in res:// or compressed databases. Returns true
if the database was opened successfully.
Can be written to, but the changes are NOT saved!
Opens an in-memory database.