Get Started
Query your Database

Query your Database

Using the web console (opens in a new tab), you can execute any queries in the bottom terminal:


When using the console's terminal, do not insert spaces in objects. Spaces are used to separate arguments so it will be parsed incorrectly, or wrap the object with ' or ".

Get Info

To get general information about your database:



To add a doc to a collection. The doc ID will be auto-generated:

# add : data_JSON : collection_name
add {name:"Bob",age:20} people


To write a new document:

# set : data_JSON : collection_name : doc_id
set {name:"Bob",age:20} people Bob


To update an existing document:

# update : data_JSON : collection_name : doc_id
update {age:30} people Bob


To delete an existing document:

# delete : collection_name : doc_id
delete people Bob


To update an existing document or create a new one if it does not already exist:

# upsert : data_JSON : collection_name : doc_id
upsert {name:"Bob",age:20} people Bob

Let's add some new documents for the following tutorial:

set {name:"Bob",age:20} people Bob
set {name:"Alice",age:30} people Alice
set {name:"Mike",age:40} people Mike


To get a single doc:

get people Bob 

To get all the docs in a collection:

get people


To limit the number of the docs returned:

get people 2


To get the docs where the age is 20:

get people ["age","==",20]

You can use the same operators as Firestore (opens in a new tab), which includes ==, !=, >, >=, <, <=, in, not-in, array-contains, and array-contains-any.


To sort by age in descending order:

get people ["age","desc"]

Single field indexes are automatically generated. But to sort by more than 1 field, multi-field indexes need to be added explicitly. Read onto the following section.

Add multi-field indexes

To set an index to sort people first by age in descending order, then by name in ascending order:

addIndex [["age","desc"],["name","asc"]] people

Then you can use this query:

get people ["age","desc"] ["name"]