Getting data
Let's start with the real job! Get all the data, get some bits and sort the data!
Get all the data
let allTheDate = await table.getAll();
// Everything is now in the variable "allTheData"table.getAll().then(() => {
// Everything is now in the variable "allTheData"
});Getting specific data
// Making the filter
let filter = new client.filter(null, "and");
filter.add("mail", "@gmail.com", "ends");
// Getting the information from the database
let gmails = await table.where(filter);
// Everyone with a gmail address is now in the variable "gmails"!// Making the filter
let filter = new client.filter(null);
filter.add("mail", "@gmail.com", "ends");
// Getting the information from the database
let gmails = table.where(filter).then(gmails => {
// Everyone with a gmail address is now in the variable "gmails"!
});Sorting data
Last updated
Was this helpful?