RawTable class final
A raw table, defined by the user instead of being managed by PowerSync.
Any ordinary SQLite table can be defined as a raw table, which enables:
- More performant queries, since data is stored in typed rows instead of the schemaless JSON view PowerSync uses by default.
- More control over the table, since custom column constraints can be used in its definition.
PowerSync doesn't know anything about the internal structure of raw tables - instead, it relies on user-defined put and delete statements to sync data into them.
When using raw tables, you are responsible for creating and migrating them when they've changed. Further, triggers are necessary to collect local writes to those tables. For more information, see the documentation.
Note that raw tables are only supported by the Rust sync client, which needs to be enabled when connecting with raw tables.
Constructors
- RawTable({required String name, required PendingStatement put, required PendingStatement delete})
-
const
Properties
- delete → PendingStatement
-
A statement responsible for deleting a row based on its PowerSync id.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the table as used by the sync service.
final
- put → PendingStatement
-
A statement responsible for inserting or updating a row in this raw table
based on data from the sync service.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited