Cloudflare D1 icon

Cloudflare D1

Execute operations against Cloudflare D1 serverless databases. Supports structured operations (Insert, Select, Update, Delete), raw SQL queries, and can be used as a tool by AI Agents.

Table → Find Record

AI-generated

Summary

Find records in a table matching a column condition.

Inputs

  • databaseId (required) — The unique identifier of the Cloudflare D1 database.
  • table (required) — The table to search within; can be selected from a list, entered by name, or provided as an ID.
  • findColumn (required) — The column to apply the search condition on; select from list, type a name, or use an ID.
  • findOperator (required) — The comparison operator used to match findValue; e.g., '=', 'LIKE', 'IN', 'IS NULL'.
  • findValue — The value to compare against; for LIKE use % wildcards, for IN use comma‑separated values.
  • findOptions — Additional options such as returning the most recent records or limiting the number of results.

Output shape

a list of matching records

Returns up to the configured limit; when findLatest is true the results are ordered by rowid DESC.

Examples

Example 1: Retrieve the latest 5 records from the 'users' table where the 'email' column contains 'example.com'.

databaseId: '', table: 'users', findColumn: 'email', findOperator: 'LIKE', findValue: '%example.com%', findOptions: {findLatest:true, findLimit:5}

Example 2: Find exact match of 'active' in the 'status' column.

databaseId: '', table: 'posts', findColumn: 'status', findOperator: '=', findValue: 'active', findOptions: {findLatest:false}

Example 3: Search for NULL values in the 'deleted_at' column.

databaseId: '', table: 'orders', findColumn: 'deleted_at', findOperator: 'IS NULL', findValue: ''

Discussion