Basic Queries

const results = await myBase.fetch({
    "is_awesome": true,
    "age": 25
})

Query Operators

The following operators can be used to create complex queries:

OperatorDescriptionExample
?neNot equal{"age?ne": 25}
?ltLess than{"age?lt": 25}
?gtGreater than{"age?gt": 25}
?lteLess than or equal{"age?lte": 25}
?gteGreater than or equal{"age?gte": 25}
?pfxPrefix{"name?pfx": "Jo"}
?rRange{"age?r": [18, 30]}
?containsContains{"tags?contains": "javascript"}
?not_containsNot contains{"tags?not_contains": "python"}

Complex Query Example

const results = await myBase.fetch({
    "age?gte": 18,
    "age?lt": 30,
    "tags?contains": "active",
    "email?pfx": "john"
})

Pagination

let lastKey = undefined
do {
    const results = await myBase.fetch(query, {
        limit: 1000,
        last: lastKey
    })
    // Process results.items
    lastKey = results.last
} while (lastKey)