Records
Manage data table records in your Memberstack application.
memberstack records <subcommand> [options]records create
Create a new record in a data table.
memberstack records create <table_key> --data <key=value> [options]Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
Options
| Option | Description | Required |
|---|---|---|
--data <key=value> | Record field data (repeatable) | Yes |
Example
memberstack records create products --data name=Widget --data price=29.99records update
Update a record in a data table.
memberstack records update <table_key> <record_id> --data <key=value> [options]Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
record_id | Record ID | Yes |
Options
| Option | Description | Required |
|---|---|---|
--data <key=value> | Record field data (repeatable) | Yes |
Example
memberstack records update products rec_abc123 --data price=39.99 --data status=activerecords delete
Delete a record from a data table.
memberstack records delete <table_key> <record_id>Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
record_id | Record ID | Yes |
Example
memberstack records delete products rec_abc123records query
Query records using a JSON query body.
memberstack records query <table_key> --query <json>Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
Options
| Option | Description | Required |
|---|---|---|
--query <json> | Query body as a JSON string | Yes |
Examples
# Fetch first 10 records
memberstack records query products --query '{"pagination":{"first":10}}'
# Filter records by field value
memberstack records query products --query '{"filter":{"fieldFilters":{"status":{"equals":"active"}}}}'
# Paginate with cursor
memberstack records query products --query '{"pagination":{"first":10,"after":"cursor_abc"}}'records count
Count records in a data table.
memberstack records count <table_key>Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
Example
$ memberstack records count products
Total records: 256records find
Find records with a friendly filter syntax.
memberstack records find <table_key> [options]Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
Options
| Option | Description |
|---|---|
--where <clause> | Filter clause: "field operator value" (repeatable) |
--take <n> | Limit number of results |
Supported Operators
equals, not, in, notIn, lt, lte, gt, gte, contains, startsWith, endsWith
Examples
memberstack records find products --where "status equals active" --take 10
memberstack records find products --where "price gte 20" --where "category equals electronics"
memberstack records find products --where "name contains widget" --take 20records export
Export all records from a data table.
memberstack records export <table_key> [options]Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
Options
| Option | Description | Default |
|---|---|---|
--format <format> | Output format: csv or json | json |
--output <path> | Output file path | records-{tableKey}.json or .csv |
Examples
memberstack records export products
memberstack records export products --format csv --output products.csvExported CSV files flatten nested fields with data.* prefixes.
records import
Import records into a data table from a file.
memberstack records import <table_key> --file <path>Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
Options
| Option | Description | Required |
|---|---|---|
--file <path> | Input file path (CSV or JSON) | Yes |
File Format
CSV column headers can optionally use the data.* prefix. Both name and data.name are accepted.
Examples
memberstack records import products --file records.csv
memberstack records import products --file records.jsonrecords bulk-update
Bulk update records from a CSV or JSON file.
memberstack records bulk-update --file <path> [options]Options
| Option | Description | Required |
|---|---|---|
--file <path> | Input file with record updates | Yes |
--dry-run | Preview changes without applying them | No |
File Format
Required fields: id
Optional fields: data.* fields
Examples
memberstack records bulk-update --file updates.csv
memberstack records bulk-update --file updates.csv --dry-runrecords bulk-delete
Bulk delete records matching a filter.
memberstack records bulk-delete <table_key> [options]Arguments
| Argument | Description | Required |
|---|---|---|
table_key | Table key or ID | Yes |
Options
| Option | Description |
|---|---|
--where <clause> | Filter clause: "field operator value" (repeatable) |
--dry-run | Preview deletions without applying them |
Examples
memberstack records bulk-delete products --where "status equals archived"
memberstack records bulk-delete products --where "price lt 5" --dry-runFAQ
How is this guide?
Last updated on