Table class
A single table in the schema.
Constructors
-
Table(String name, List<
Column> columns, {List<Index> indexes = const [], String? viewName, bool localOnly = false}) -
Create a synced table.
const
-
Table.insertOnly(String name, List<
Column> columns, {String? viewName}) -
Create a table that only supports inserts.
const
-
Table.localOnly(String name, List<
Column> columns, {List<Index> indexes = const [], String? viewName}) -
Create a table that only exists locally.
const
Properties
-
columns
→ List<
Column> -
List of columns.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
indexes
→ List<
Index> -
List of indexes.
final
- insertOnly → bool
-
Whether this is an insert-only table.
final
- internalName → String
-
Internal use only.
no setter
- localOnly → bool
-
Whether the table only exists only.
final
- maxNumberOfColumns → int
-
There is maximum of 127 arguments for any function in SQLite. Currently we use json_object which uses 1 arg per key (column name)
and one per value, which limits it to 63 arguments.
final
- name → String
-
The synced table name, matching sync rules.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- validName → bool
-
no setter
- viewName → String
-
Name for the view, used for queries.
Defaults to the synced table name.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void - Check that there are no issues in the table definition.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String columnName) → Column