Use this file to discover all available pages before exploring further.
The Query Builder is the primary API for reading data from OnDB. It provides a fluent interface for composing queries with full control over conditions, joins, aggregations, and selections.
.equals(value) // Field equals value.notEquals(value) // Field does not equal value.greaterThan(value) // Field > value.lessThan(value) // Field < value.greaterThanOrEqual(value) // Field >= value.lessThanOrEqual(value) // Field <= value.between(min, max) // Field value between min and max
.contains(value) // Field contains substring.startsWith(value) // Field starts with string.endsWith(value) // Field ends with string.regExpMatches(pattern) // Field matches regex pattern.includesCaseInsensitive(value) // Case-insensitive contains.startsWithCaseInsensitive(value) // Case-insensitive starts with.endsWithCaseInsensitive(value) // Case-insensitive ends with
.isTrue() // Field is true.isFalse() // Field is false.isNull() // Field is null.isNotNull() // Field is not null.exists() // Field exists.notExists() // Field does not exist
Returns the latest record by metadata timestamp (updatedAt or createdAt). Useful for finding a single record when multiple versions may exist:
const user = await client.queryBuilder() .collection('users') .whereField('email').equals('alice@example.com') .executeUnique<User>();// Returns: User | null (latest version by timestamp)