client.sql() for SELECT queries and client.sqlInsert() for INSERT statements. Tables are addressed using the app_id::collection format.
SQL Queries
Execute SELECT queries against your collections usingclient.sql().
Include History
By default, queries return only the latest version of each record. SetincludeHistory to true to retrieve all historical versions.
SQL Inserts
Useclient.sqlInsert() to insert data with SQL INSERT statements.
SQL Syntax Reference
OnDB supports a subset of SQL syntax. Tables must be referenced inapp_id::collection format.
Examples
Response Format
Thesql() method returns a SqlQueryResponse:
Next Steps
Query Builder
Fluent query API with type-safe conditions
Predefined Queries
Named, parameterized queries with public endpoints