Set up the PreapredStatement for convenience in SQLite3QueryBuilder::create_prepared_statement().

This commit is contained in:
Relintai 2024-04-27 19:06:38 +02:00
parent 04ef468ffa
commit e845f2f905

View File

@ -411,7 +411,13 @@ void SQLite3QueryBuilder::run_query() {
Ref<PreparedStatement> SQLite3QueryBuilder::create_prepared_statement() {
ERR_FAIL_COND_V(!_connection.is_valid(), Ref<PreparedStatement>());
return _connection->create_prepared_statement();
Ref<PreparedStatement> stmt = _connection->create_prepared_statement();
if (stmt.is_valid()) {
stmt->set_sql(get_result());
}
return stmt;
}
QueryBuilder *SQLite3QueryBuilder::select_last_insert_id() {