Getting Started

Basics

Query Modifiers

.where() .sort()

Query Predicates

.equals() .notEquals() .exists() .notExists() .startsWith() .endsWith() .contains() .greaterThan() .lessThan() .between() .outside()

Query Executors

.read() .first() .last() .count() .sum() .average() .min() .max() .update() .delete()

Login Methods

.exists() .login() .logout()

Instance Methods

.read() .delete()

Instance Login Methods

.login() .logout() .changePassword()

Misc

Back.then() Back.saved() Back.user() Back.eachProperty() Back.eachDescendant() IFile Property LoginResult

Executors.first()

Executes the query, returning only the first matched result.

// With no filters:
Employees.first(employee =>
{
	// employee is either instanceof Employee, 
	// or null if there were no matches.
});

// With a sort filter:
Employees
	.sort(Employee.name)
	.first(employee =>
	{
		// employee is either instanceof Employee, or null if there were no matches.
	});

Method signature (TypeScript)

static first(resultFn: (result: Instance) => void): void;

Details

resultsFn
The function that will be called when the query has returned. An instance is passed to the first parameter.
returns
void