Link Search Menu Expand Document

EasyQB — Query Builder for Easybase


Query Builder used in Easybase’s JavaScript-based packages for serverless frontend applications. This project is based on Sqorn using functional expressions and conditionals. If you’re just starting out, head to the Select page to begin.

EasyQB is built into both easybase-react and easybasejs, through the exported db function. This function allows developers to logically create Easybase CRUD operations in code. It will become the standard query functionality for Easybase, replacing Frame.

The documentation outlined here is very much a modified version of that available on the Sqorn website.

Basic Usage:

Note that queries are not executed until a call to .one or .all.

import Easybase from "easybasejs";
import ebconfig from "./ebconfig.js";

const table = Easybase.EasybaseProvider({ ebconfig }).db();
const { e } = table; // Expressions

// Delete 1 record
await table.delete.where(e.eq('app name', 'right now')).one();

// Basic select example
const records = await table.return().where(e.gt('rating', 15)).limit(10).all();
console.log(records);

To use this library you must first create and account an account at easybase.io, then configure your project.

Advanced usage and options available in configuration.


Built With


Copyright © 2018-2021 Easybase