Every Data Query Must Use Every Bucket Parameter
Data queries are used to group data into buckets, so each data query must use every bucket parameter.Examples
Grouping by list_id
Selecting output columns/fields
When specific columns/fields are selected, only those columns/fields are synced to the client. This is good practice, to ensure the synced data does not unintentionally change when new columns are added to the schema (in the case of Postgres) or to the data structure (in the case of MongoDB). Note: Anid column must always be present, and must have a text type. If the primary key is different, use a column alias and/or transformations to output a text id column.
MongoDB uses
_id as the name of the ID field in collections. Therefore, PowerSync requires using SELECT _id as id in the data queries when using MongoDB as the backend source database.