type PowerSyncCollectionConfig<TTable, TSchema> = BasePowerSyncCollectionConfig<TTable, TSchema> &
| ConfigWithSQLiteTypes
| ConfigWithSQLiteInputType<TTable, TSchema>
| ConfigWithArbitraryCollectionTypes<TTable, TSchema>;
type PowerSyncCollectionConfig<TTable, TSchema> = BasePowerSyncCollectionConfig<TTable, TSchema> &
| ConfigWithSQLiteTypes
| ConfigWithSQLiteInputType<TTable, TSchema>
| ConfigWithArbitraryCollectionTypes<TTable, TSchema>;
Defined in: definitions.ts:222
Configuration options for creating a PowerSync collection.
TTable extends Table = Table
TSchema extends StandardSchemaV1<any> = never
const APP_SCHEMA = new Schema({
documents: new Table({
name: column.text,
}),
})
const db = new PowerSyncDatabase({
database: {
dbFilename: "test.sqlite",
},
schema: APP_SCHEMA,
})
const collection = createCollection(
powerSyncCollectionOptions({
database: db,
table: APP_SCHEMA.props.documents
})
)
const APP_SCHEMA = new Schema({
documents: new Table({
name: column.text,
}),
})
const db = new PowerSyncDatabase({
database: {
dbFilename: "test.sqlite",
},
schema: APP_SCHEMA,
})
const collection = createCollection(
powerSyncCollectionOptions({
database: db,
table: APP_SCHEMA.props.documents
})
)
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.
