SurrealDB icon

SurrealDB

Interaction with a SurrealDB database

Table → Get All Records

AI-generated

Summary

Retrieve multiple records from a specified SurrealDB table with support for pagination, optional namespace/database overrides, and connection pooling configuration.

Inputs

  • Table (required) — The target SurrealDB table name from which to fetch all records. If a full record ID is provided (e.g., "person:john"), the table portion will be extracted automatically.
  • Limit — Maximum number of records to return; defaults to 100.
  • Start — Number of records to skip before starting to return results; defaults to 0.
  • Treat Missing Table As Empty Result — If set to true, the node returns an empty result instead of an error when the specified table does not exist.
  • Namespace — Optional namespace override for this operation instead of the credential default.
  • Database — Optional database override for this operation instead of the credential default.
  • Connection Pooling — Optional settings to configure connection pooling parameters including max/min connections, timeouts, retry attempts, and connection validation.

Output shape

a list of records retrieved from the specified table, each record represented as a JSON object.

The number of records returned respects the Limit and Start parameters for pagination. If the table does not exist and the 'Treat Missing Table As Empty Result' option is false, an error will be thrown. Namespace and Database parameters override the credentials' defaults if provided. Connection pooling settings affect how database connections are managed for performance but do not affect the returned data shape.

Examples

Example 1: Fetch up to 50 records from the 'person' table, skipping the first 10 records.

Table='person', Limit=50, Start=10

Example 2: Get all records from 'product' table treating missing tables as empty responses.

Table='product', Treat Missing Table As Empty Result=true

Example 3: Retrieve records from 'order' table specifying a particular namespace and database.

Table='order', Namespace='sales_ns', Database='sales_db'

Links

Discussion