Table class

A single table in the schema.

Implementers

Constructors

Table(String name, List<Column> columns, {List<Index> indexes = const [], String? viewName, bool localOnly = false, bool ignoreEmptyUpdates = false, bool trackMetadata = false, TrackPreviousValuesOptions? trackPreviousValues})
Create a synced table.
const
Table.insertOnly(String name, List<Column> columns, {String? viewName, bool ignoreEmptyUpdates = false, bool trackMetadata = false, TrackPreviousValuesOptions? trackPreviousValues})
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
ignoreEmptyUpdates → bool
Whether an UPDATE statement that doesn't change any values should be ignored when creating CRUD entries.
final
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 locally.
final
maxNumberOfColumns → int
powersync-sqlite-core limits the number of columns per table to 1999, due to internal SQLite limits.
final
name → String
The synced table name, matching sync rules.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trackMetadata → bool
Whether to add a hidden _metadata column that will be enabled for updates to attach custom information about writes that will be reported through CrudEntry.metadata.
final
trackPreviousValues → TrackPreviousValuesOptions?
Whether to track old values of columns for CrudEntry.previousValues.
final
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