Database
Usage
Guides for using PocketSyncDatabase
PocketSyncDatabase
In our Flutter SDK, PocketSyncDatabase is a wrapper around sqflite database. Our Typescript SDK (planned) will use sql.js.
Usage
PocketSyncDatabase is initialized with PocketSync instance. You can access it via PocketSync.instance.database
.
CRUD Operations
PocketSyncDatabase
provides simple methods for performing CRUD (Create, Read, Update, Delete) operations on your data.
Create
Read
Update
Delete
Transactions
Batch operations
Raw SQL
Watch changes
Supported datatypes
PocketSyncDatabase does not support the following datatypes:
DateTime
is not a supported SQLite type. UseINTEGER
andmillisSinceEpoch
values.bool
is not a supported SQLite type. UseINTEGER
and0
and1
values.
Learn more
PocketSyncDatabase is a wrapper around sqflite, hence it supports all the features of sqflite and shares their limitations.