get Connection
Returns the SQLiteConnection instance that was most recently opened by the call to the open method. The connection is cached internally for the lifetime of the KQLiteDatabase instance or until close is called.
This is useful for passing the connection explicitly to other functions, such as transaction blocks or when performing raw SQL queries.
Example:
val connection = myDatabase.getConnection()
if (connection != null) {
// Use the connection for a specific operation
connection.execSQL(...)
}Content copied to clipboard
Return
The active SQLiteConnection, or null if the database has not been opened or has already been closed.
Author
MOHAMMAD AZIM ANSARI