SQLiteConnection



SQLite connection definition.

A connection to a database is a resource that must be released once it is no longer needed via its close function.

See also Database Connection

Summary

Public functions

Unit

Closes the database connection.

Cmn
SQLiteStatement

Prepares a new SQL statement.

Cmn

Extension functions

Unit

Executes a single SQL statement that returns no values.

Cmn

Public functions

close

fun close(): Unit

Closes the database connection.

Once a connection is closed it should no longer be used. Calling this function on an already closed database connection is a no-op.

prepare

fun prepare(sql: String): SQLiteStatement

Prepares a new SQL statement.

See also Compiling a SQL statement

Parameters
sql: String

the SQL statement to prepare

Returns
SQLiteStatement

the prepared statement.

Extension functions

execSQL

fun SQLiteConnection.execSQL(sql: String): Unit

Executes a single SQL statement that returns no values.