Creates a new database connection.
| Param | Type | Description |
|---|---|---|
| database | string |
Path to the database file |
Creates a new database cursor.
Unimplemented.
Commits the current transaction and starts a new one.
Rolls back the current transaction and starts a new one.
Closes the database connection.
Connection objects can be used as context managers to ensure that transactions are properly committed or rolled back. When entering the context, the connection object is returned. When exiting:
- Without exception: automatically commits the transaction
- With exception: automatically rolls back the transaction
This behavior is compatible with Python's sqlite3 module. Context managers work correctly in both transactional and autocommit modes.
When mixing manual transaction control with context managers, the context manager's commit/rollback will apply to any active transaction at the time of exit. Manual calls to commit() or rollback() within the context are allowed and will start a new transaction as usual.
Create a new cursor object and executes the SQL statement.
Create a new cursor object and Execute the SQL statement for every item in parameters array.
| Param | Type | Description |
|---|---|---|
| sql | string |
Path to the database file |
| parameters | array |
Array of parameter tuples to execute SQL with. |
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Unimplemented.
Starting from Python 3.12, the autocommit property is supported, controlling PEP 249 transaction handling behavior. By default, autocommit is set to LEGACY_TRANSACTION_CONTROL, but this will change to False in a future Python release. For more details, refer to Connection.autocommit in the official Python documentation.
Returns True if there's an active transaction with uncommitted changes; otherwise returns False.
Transaction handling mode configuration. If isolation_level is set to "DEFERRED", "IMMEDIATE", or "EXCLUSIVE", transactions begin implicitly, but need to be committed manually. If isolation_level is set to None, then database is in auto-commit mode, executing each statement in its own transaction.
Unimplemented.
Unimplemented.
Unimplemented.
Execute one SQL statement.
Execute the SQL statement for every item in parameters array.
| Param | Type | Description |
|---|---|---|
| sql | string |
Path to the database file |
| parameters | array |
Array of parameter tuples to execute SQL with. |
Unimplemented.
Return next row in result set.
Return size next rows in result set. If there are no more rows left, returns an empty list.
Return all rows in result set.
Unimplemented.
Unimplemented.
Unimplemented.
The number of rows returned by fetchmany() by default.
Unimplemented.
Column names of the query that was run last.
Returns the row ID of the last inserted row.
Returns the number of rows changed by INSERT, UPDATE, DELETE, and REPLACE statements. For other types of statements, returns -1.
Unimplemented.