SQLiteConnection


public interface 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 methods

abstract void

Closes the database connection.

abstract @NonNull SQLiteStatement

Prepares a new SQL statement.

Extension functions

default final void

Executes a single SQL statement that returns no values.

Public methods

close

Added in 2.5.0-alpha12
abstract void close()

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

Added in 2.5.0-alpha12
abstract @NonNull SQLiteStatement prepare(@NonNull String sql)

Prepares a new SQL statement.

See also Compiling a SQL statement

Parameters
@NonNull String sql

the SQL statement to prepare

Returns
@NonNull SQLiteStatement

the prepared statement.

Extension functions

SQLite.execSQL

default final void SQLite.execSQL(@NonNull SQLiteConnection receiver, @NonNull String sql)

Executes a single SQL statement that returns no values.