Actions25
- Database Actions
- Memory Actions
- Query Actions
- Query Builder Actions
- Table Actions
- Table Management Actions
Query Builder → Query Builder
AI-generatedSummary
Query rows from a Cloudflare D1 table using a visual builder, applying filters, ordering, limits, and offsets.
Inputs
- databaseId (required) — Unique identifier of the target Cloudflare D1 database.
- builderTable (required) — Name or identifier of the table to query.
- queryColumns — Columns to select; leave empty to return all columns.
- whereConditions — Conditions to filter rows, each specifying a field, operator, and value.
- orderBy — Sorting specification for result ordering.
- builderLimit — Maximum number of rows to return.
- builderOffset — Number of rows to skip before returning results.
Output shape
an object containing success status, results array, and metadata (including row counts and executed SQL)
Results may be empty; metadata may include rowsRead, count, and the executed query string.
Examples
Example 1: Select matching rows from a table
databaseId: "12345", builderTable: "users", queryColumns: [], whereConditions: [{field: "age", operator: ">", value: 18}], orderBy: [{field: "created_at", direction: "DESC"}], builderLimit: 50, builderOffset: 0
Example 2: Aggregate count of records
databaseId: "12345", builderTable: "orders", aggregateFunction: "COUNT", aggregateColumn: "*", whereConditions: [{field: "status", operator: "=", value: "active"}], groupBy: []
Example 3: Insert a new record
databaseId: "12345", builderTable: "users", columnValues: [{property: {name: "name", value: "Alice"}, value: "Alice"}]