Actions10
📄 记录 → 📋 获取多条记录
AI-generatedSummary
Queries a specified PocketBase collection for records using optional filters, sorting, field selection, and expansion.
Inputs
- collection (required) — The name of the collection to query records from.
- returnAll — When true, fetches all records; when false, uses the limit parameter (default 50).
- limit — Maximum number of records to return (1-500). Only active when returnAll is false.
- options.filter — Filter expression to restrict results (e.g., 'status = "active"').
- options.sort — Sort fields, prefixed with '-' for descending order (e.g., '-created,title').
- options.expand — Comma-separated list of relation fields to fetch and expand.
- options.fields — Comma-separated list of specific fields to return.
Output shape
a list of items, where each item contains a JSON object representing a record (or a single record if no pagination occurs).
When returnAll is true, the node returns an array of records. When false, it returns an array of items containing the requested subset. System fields (id, created, updated) are included by default.
Examples
Example 1: Fetch the first 25 active orders from 2024.
Collection: orders, returnAll: false, limit: 25, options.filter: 'status = "active" && created > "2024-01-01"'
Example 2: Retrieve all users sorted by creation date in descending order.
Collection: users, returnAll: true, options.sort: '-created'
Example 3: Get a specific set of users with their posts included.
Collection: users, returnAll: false, limit: 10, options.expand: 'posts,profile'
