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.max()

Executes the query, returning only the maximum value of the specified property, of all matched results.

// With no filters:
Employees.max(Employee.salary, maxValue =>
{
	// maxValue is salary of the highest paid employee.
});
// With a filter:
Employees
	.where(Employee.name).equals("Paul")
	.max(Employee.salary, maxValue =>
	{
		// maxValue is the salary of the highest paid
		// employee named "Paul"
	});

Method signature (TypeScript)

static max(property: NumberProperty, resultFn: (result: number) => void): void;

Details

property
A NumberProperty to apply the operation against.
resultsFn
The function that will be called when the query has returned. A number is passed to the first parameter being the result of the max calculation.
returns
void