StorageDomain.Database


class StorageDomain.Database : StorageDomain


Targets structured SQLite/Room database records.

Summary

Public constructors

Database(
    dbName: String,
    table: String,
    primaryKeyCol: String,
    primaryKeyVal: Any,
    columnValues: Map<String, Any?>
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Map<String, Any?>

A non-empty Map of column names to their values to populate or verify.

String

The name of the SQLite database file on the device.

String

The column name of the primary key used to identify the target record.

Any

The value of the primary key used to identify the target record.

String

The target table name to insert into or query from.

Public constructors

Database

Database(
    dbName: String,
    table: String,
    primaryKeyCol: String,
    primaryKeyVal: Any,
    columnValues: Map<String, Any?>
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

columnValues

Added in 1.0.0-alpha03
val columnValues: Map<String, Any?>

A non-empty Map of column names to their values to populate or verify. Supported types are: String, Int, Long, Float, Double, Boolean, or null, which stands for SQL NULL. It may include primaryKeyCol, matched case-insensitively like SQLite column names, but only with a value whose string form equals that of primaryKeyVal; otherwise construction fails with an IllegalArgumentException. When it is omitted, primaryKeyVal is written to that column.

dbName

Added in 1.0.0-alpha03
val dbName: String

The name of the SQLite database file on the device.

primaryKeyCol

Added in 1.0.0-alpha03
val primaryKeyCol: String

The column name of the primary key used to identify the target record.

primaryKeyVal

Added in 1.0.0-alpha03
val primaryKeyVal: Any

The value of the primary key used to identify the target record. Supported types are: String, Int, Long, Float, Double, Boolean.

table

Added in 1.0.0-alpha03
val table: String

The target table name to insert into or query from.