Star

Created With

linkReturn

linkReturn by using a literal string

A literal string will be used as is.

1linkconst queryBuilder = new QueryBuilder()

2link .return('a, b.p1'); /* --> literal string to use */

3link

4linkconsole.log(queryBuilder.getStatement()); // RETURN a, b.p1

5linkconsole.log(queryBuilder.getBindParam().get()); // {}

linkReturn by using an array of literal strings

The literal strings will be joined with a comma.

1linkconst queryBuilder = new QueryBuilder()

2link .return(['a', 'b.p1']); /* --> literal strings to use */

3link

4linkconsole.log(queryBuilder.getStatement()); // RETURN a, b.p1

5linkconsole.log(queryBuilder.getBindParam().get()); // {}

linkOrder by, by using an object array

An array of objects with an identifier/name, and an optional property.

1linkconst queryBuilder = new QueryBuilder().return([

2link {

3link /* --> identifier/name to return */

4link identifier: 'a',

5link /* --> (optional) the property of the identifier to return */

6link property: 'name',

7link }

8link {

9link identifier: 'b'

10link }

11link]);

12link

13linkconsole.log(queryBuilder.getStatement()); // RETURN a.name, b

14linkconsole.log(queryBuilder.getBindParam().get()); // {}

ReturnReturn by using a literal stringReturn by using an array of literal stringsOrder by, by using an object array

Introduction Getting Started

Modelschevron_right

Sessions and Transactions

Query Builderchevron_right
Query Runnerchevron_right

Bind Parameters

Where Parameters