Data Storage
lists
List management and operations
lists
List and collection management with filtering, sorting, pagination, and bulk operations for managing sets of items with subscriptions and real-time updates.
Overview
The lists primitive provides powerful list management capabilities including dynamic filtering, multi-field sorting, cursor-based pagination, and bulk operations with automatic caching and real-time synchronization.
Quick Example
import { lists } from 'sdk.do'
// Create list
const customerList = await lists.create({
name: 'active-customers',
type: 'customers',
filters: {
status: 'active',
lastPurchase: { gte: '2024-01-01' },
},
sort: { field: 'lastPurchase', order: 'desc' },
})
// Query list
const items = await lists.query('active-customers', {
limit: 50,
cursor: 'next-page-token',
})
// Subscribe to changes
lists.subscribe('active-customers', (event) => {
console.log(`List ${event.type}:`, event.items)
})
// Bulk operations
await lists.update('active-customers', {
where: { segment: 'premium' },
data: { tier: 'gold' },
})Core Capabilities
- Dynamic Filtering - Complex query conditions
- Multi-field Sorting - Sort by multiple criteria
- Pagination - Cursor and offset pagination
- Real-time Updates - Subscribe to list changes
- Bulk Operations - Update/delete multiple items
Access Methods
SDK
TypeScript/JavaScript library for list management
await lists.create({ name: 'active-customers', type: 'customers', filters: { status: 'active' } })CLI
Command-line tool for list operations
do list create active-customers --type customers --filter "status=active"API
REST/RPC endpoints for list management
curl -X POST https://api.do/v1/lists -d '{"name":"active-customers","filters":{"status":"active"}}'MCP
Model Context Protocol for AI-driven list management
Create a list of active customers who purchased in the last 30 days