RawTable

class RawTable(val name: String, val put: PendingStatement, val delete: PendingStatement) : BaseTable(source)

A table that is managed by the user instead of being auto-created and migrated by the PowerSync SDK.

These tables give application developers full control over the table (including table and column constraints). The put and delete statements the sync client uses to apply operations to the local database also need to be set explicitly.

A main benefit of raw tables is that, since they're not backed by JSON views, complex queries on them can be much more efficient. However, it's the responsibility of the developer to create these raw tables, migrate them when necessary and to write triggers detecting local writes. For more information, see the documentation page.

Note that raw tables are only supported when SyncOptions.newClientImplementation is enabled.

Constructors

Link copied to clipboard
constructor(name: String, put: PendingStatement, delete: PendingStatement)

Properties

Link copied to clipboard

The statement to run when the sync client wants to delete a row.

Link copied to clipboard
open override val name: String

The name of the table.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun validate()

Check that there are no issues in the table definition.