Table<Columns>
A table with a statically-typed Columns record structure.
This is the recommended way to declare tables in PowerSync schemas.
Extends
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
Columns extends ColumnsType | ColumnsType |
Constructors
new Table()
new Table<Columns>(columns, options?): Table<Columns>
Creates a new Table instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
columns | Columns | A Columns object (a record of column names to column types). |
options? | TableOptions | Optional configuration options for the table. |
Returns
Table<Columns>
Example
const table = new Table(
{
name: column.text,
age: column.integer
},
{ indexes: { nameIndex: ['name'] } }
);
Overrides
Properties
| Property | Modifier | Type | Inherited from |
|---|---|---|---|
options | readonly | ResolvedTableOptions | ResolvedTable.options |
Accessors
columns
Get Signature
get columns(): Column[]
Returns
Column[]
Inherited from
ignoreEmptyUpdates
Get Signature
get ignoreEmptyUpdates(): boolean
Returns
boolean
Inherited from
ResolvedTable.ignoreEmptyUpdates
indexes
Get Signature
get indexes(): Index[]
Returns
Index[]
Inherited from
insertOnly
Get Signature
get insertOnly(): boolean
Returns
boolean
Inherited from
internalName
Get Signature
get internalName(): string
Returns
string
Inherited from
localOnly
Get Signature
get localOnly(): boolean
Returns
boolean
Inherited from
name
Get Signature
get name(): string
Returns
string
Inherited from
trackMetadata
Get Signature
get trackMetadata(): boolean
Returns
boolean