ReadonlynameThe name of the store (e.g. 'mongodb', 'redis', 'dynamodb')
ReadonlylibraryThe client library being used
Returns the underlying rethinkdb-ts term-builder (r).
Fetch a single document from table by its primary key. Resolves to null if not found.
Partially update the document with primary key id in table, merging patch.
Delete the document with primary key id from table.
Return all documents in table matching predicate as an array.
predicate is any ReQL filter argument - a match object
({ active: true }) or a predicate function (row => row('age').gt(18)).
The result is materialized (cursor drained to an array) before returning.
Fetch all documents in table matching an ORM where clause, with
optional ordering, offset, and limit. The where object accepts the full
ORM operator surface (Op.gt, Op.in, Op.like, Op.and/Op.or, ...),
translated to a native ReQL filter predicate - so standard queries never
require hand-written ReQL.
Fetch the first document in table matching an ORM where clause (respecting order), or null.
Count documents in table matching an ORM where clause.
Update every document in table matching an ORM where clause, merging patch.
Delete every document in table matching an ORM where clause.
Insert doc, updating (or replacing) the existing row on a primary-key
conflict - RethinkDB's native upsert via insert(..., { conflict }).
Distinct values of field across table (optionally over a secondary index).
Optionalfield: stringOptionalindex: stringFetch documents whose key (or secondary-index value) is one of keys.
Optionalindex: stringGrouped aggregation over table using ReQL's native group/reduction
chain (count/sum/avg/min/max), with an optional ORM where
pre-filter. Returns one entry per group: { group, ...aggregates }.
Create a secondary index on table. indexer may be a field name, list of fields (compound), or a ReQL function.
Optionalindexer: unknownOptionaloptions: Record<string, unknown>Drop a secondary index from table.
List secondary index names on table.
Wait for one or all secondary indexes on table to finish building.
Create a table. Pass a single name to create it in the connection's
default database, or (db, name) to create it in a specific database.
Optionalname: stringDrop a table. Pass a single name, or (db, name) for a specific database.
Optionalname: stringList tables in the default (or given) database.
Optionaldb: stringList all databases.
RethinkDB has no multi-document transactions. Single-document writes are atomic, and updateWhere/deleteWhere apply atomically per document, but there is no way to commit changes across documents/tables as a unit. This throws a clear, typed capability error rather than silently pretending to provide isolation.
Run an arbitrary ReQL query term (built from getClient()), for
operations not wrapped here. In single-connection mode the store's
connection is supplied to .run() automatically.
RethinkDBStorewraps therethinkdb-tsterm-builder (r) in a small, promise-based convenience layer over document CRUD, ReQLfilterqueries, and table/database creation, plus arun()escape hatch for arbitrary ReQL terms.