Skip to content

Query, sort, and bulk writes

List, bulk update, and bulk delete share the same filter encoding. The JavaScript and Dart SDKs build it for you.

GET /api/p/:projectId/:table?page=1&pageSize=20

The JSON envelope includes a data payload with items plus total (see REST conventions). SDK list() returns { items, total, ... }.

Chained where clauses combine with $and.

SDK option Mongo
isEqualTo $eq
isNotEqualTo $ne
isGreaterThan $gt
isGreaterThanOrEqualTo $gte
isLessThan $lt
isLessThanOrEqualTo $lte
isIn $in
isNotIn $nin
const published = await client
.collection('posts')
.where('status', { isEqualTo: 'published' })
.where('views', { isGreaterThan: 100 })
.orderBy('views', { descending: true })
.list({ page: 1, pageSize: 10 });

Pass null explicitly when the filter must be JSON null. Omitting a key means “operator omitted”.

final published = await client
.collection('posts')
.where('status', isEqualTo: 'published')
.where('views', isGreaterThan: 100)
.orderBy('views', descending: true)
.list(page: 1, pageSize: 10);

Use Null.value when the filter must be JSON null (Dart null means omitted).

orderBy('name'){"name": 1}. orderBy('createdAt', { descending: true }){"createdAt": -1}. You can chain multiple orderBy calls.

On REST, pass sort as JSON (and filter as JSON) on the query string.

updateMany / deleteMany require at least one where. They map to PATCH / DELETE on the collection URL.

await client
.collection('posts')
.where('status', { isEqualTo: 'draft' })
.updateMany({ status: 'archived' });
await client
.collection('posts')
.where('status', { isEqualTo: 'archived' })
.deleteMany();