SQLiteConnection


public interface SQLiteConnection extends AutoCloseable

Known direct subclasses
SupportSQLiteConnection

A SQLiteConnection implemented by androidx.sqlite.db.SupportSQLiteDatabase and that uses the Android's SQLite through the SupportSQLite APIs.


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 @NonNull SQLiteStatement

Prepares a new SQL statement.

Extension functions

default final void

Executes a single SQL statement that returns no values.

Public methods

prepare

Added in 2.5.0
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.