DatabaseTable<T> class abstract

Definition of database table

  • T - type of contains data

data levels:

  • json - Json representation of T value
  • bin - bytes representation of T value
  • dart - T object repesentation of value
  • dartraw - List of DatabaseColumn.T
  • raw - List of DatabaseColumn.R
  • db - List of DatabaseColumn.R? used like paramters in queries
Inheritance
Implementers
Annotations
  • @immutable

Constructors

DatabaseTable(Database sql, String name, List<DatabaseColumn> columns)
const

Properties

columnId DatabaseColumnId
Column who haw primary key
no setterinherited
columns List<DatabaseColumn>
Table columns definitions
final
columnsCount int
Count of columns
no setterinherited
columnsFts Iterable<DatabaseColumn>
Table columns who need to create fts tables
no setterinherited
columnsIndexed Iterable<DatabaseColumn>
Table columns who need to create indexes
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
name String
Name of this table
final
nameFts String
Name of Fts table
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sql → Database
final
sqlInsertChunkSize int
Maximum datas insert with one command
no setterinherited

Methods

binRead(BinaryReader reader) → T
Read dart T object from bin reader
inherited
binReadRaw(BinaryReader reader) List
Read raw values from bin reader
inherited
binWrite(T value, BinaryWriter writer) → void
Wrtie dart T object to bin writer
inherited
binWriteRaw(List value, BinaryWriter writer) → void
Wrtie raw values to bin writer
inherited
dartDecode(T value) List
Converting dart T object to dartraw database columns dart represents
inherited
dartDecodeRaw(T value) List
Converting dart T object to raw
inherited
dartEncode(List value) → T
Converting dartraw database columns dart represents to dart T object
inherited
dartEncodeRaw(List value) → T
Converting raw to dart T object
inherited
jsonDecode(Object? value) → T
Converting json to dart T object
inherited
jsonDecodeRaw(Object? value) List
Converting json to raw
inherited
jsonEncode(T value) Map<String, dynamic>
Converting dart T object to json
inherited
jsonEncodeRaw(List value) Map<String, dynamic>
Converting raw to json
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rowDecodeRaw(Row value) List
Converting db values to raw values
inherited
rowEncodeRaw(List value) List
Converting raw values to db values
inherited
sqlCreate() → void
Create SQLite tables
inherited
sqlDrop() → void
Drop SQLite tables
inherited
sqlInsert(Iterable<T> data) → void
Insert dart T objects to SQLite table
inherited
sqlInsertNewsUnqiueValues(List<T> data, List<DatabaseColumn> selectors, {bool returnAdded = false, bool returnFulls = false}) MapEntry<int, List<T>>
insert dart T objects, which not founded in table return in MapEntry.key - count of added rows
inherited
sqlInsertNewsUnqiueValuesRaw(List<List> data, List<DatabaseColumn> selectors, {bool returnAdded = false, bool returnFulls = false}) MapEntry<int, List<List>>
insert raw values, which not founded in table, return in MapEntry.key - count of added rows
inherited
sqlInsertRaw(Iterable<List> data) → void
Insert raw values to SQLite table
inherited
sqlQueryCreateAllTables() String
inherited
sqlQueryCreateFts() String
inherited
sqlQueryCreateIndex(DatabaseColumn c) String
inherited
sqlQueryCreateMainTable() String
inherited
sqlQueryDelete([String condition = '']) String
inherited
sqlQueryDropAllTables() String
SQL Query string for drop tables
inherited
sqlQueryDropFts() String
inherited
sqlQueryDropIndex(DatabaseColumn c) String
inherited
sqlQueryDropMainTable() String
inherited
sqlQueryInsert(int length) String
inherited
sqlQueryRowBindings(int length) String
Generate string like ?, ?, ?, with some length
inherited
sqlQuerySelect([String condition = '']) String
inherited
sqlQuerySelectColumn(DatabaseColumn c, [String condition = '']) String
inherited
sqlQuerySelectFts([String condition = '']) String
inherited
sqlQuerySelectFtsHL([String condition = '']) String
inherited
sqlQuerySelectLength([String condition = '']) String
inherited
sqlQuerySelectLengthFts([String condition = '']) String
inherited
sqlQueryUpdate1() String
inherited
sqlQueryUpdateM(int length, [String condition = '']) String
inherited
sqlSelect([String condition = '', List<Object?> parameters = const []]) Iterable<T>
Select dart T objects from SQLite table
inherited
sqlSelectByColumns(Map<DatabaseColumn, List> m, {bool and = true}) Iterable<T>
Select dart T objects from some columns values, where MapEntry.key is column, and MapEntry.value is List of dart column value
inherited
sqlSelectByColumnsRaw(Map<DatabaseColumn, List> m, {bool and = true}) Iterable<List>
Select raw values from some columns values, where MapEntry.key is column, and MapEntry.value is List of raw column value
inherited
sqlSelectByIds(List<int> ids) Iterable<T>
Select dart T objects from theys ids
inherited
sqlSelectByIdsRaw(List<int> ids) Iterable<List>
Select raw values from theys ids
inherited
sqlSelectColumnData<C, R>(DatabaseColumn<C, R> c, [String condition = '', List<Object?> parameters = const []]) Iterable<C>
Select dart column data of column
inherited
sqlSelectColumnDataRaw<C, R>(DatabaseColumn<C, R> c, [String condition = '', List<Object?> parameters = const []]) Iterable<R>
Select raw data of column
inherited
sqlSelectCount([String condition = '', List<Object?> parameters = const []]) int
Select count of rows in SQLite table
inherited
sqlSelectCountFts([String condition = '', List<Object?> parameters = const []]) int
Select count of rows in SQLite fts table
inherited
sqlSelectFts([String condition = '', List<Object?> parameters = const []]) Iterable<T>
Select dart T objects from SQLite fts table
inherited
sqlSelectFtsHl([String condition = '', List<Object?> parameters = const []]) Iterable<T>
Select highlighted dart T objects from SQLite fts table
inherited
sqlSelectFtsHlRaw([String condition = '', List<Object?> parameters = const []]) Iterable<List>
Select raw values highlighted from SQLite fts table
inherited
sqlSelectFtsRaw([String condition = '', List<Object?> parameters = const []]) Iterable<List>
Select raw values from SQLite fts table
inherited
sqlSelectRaw([String condition = '', List<Object?> parameters = const []]) Iterable<List>
Select raw values from SQLite table
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited