Star

Created With

linkLimit

linkLimit by using a literal string

A literal string will be used as is.

1linkconst queryBuilder = new QueryBuilder()

2link .limit('toInteger(3 * rand()) + 1'); /* --> literal string to use */

3link

4linkconsole.log(queryBuilder.getStatement()); // LIMIT toInteger(3 * rand()) + 1

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

linkLimit by using a number

That way, a Bind Parameter is used

1linkconst queryBuilder = new QueryBuilder().limit(5);

2link

3linkconsole.log(queryBuilder.getStatement()); // LIMIT $limit

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

linkSkip

linkSkip by using a literal string

A literal string will be used as is.

1linkconst queryBuilder = new QueryBuilder()

2link .skip('toInteger(3 * rand()) + 1'); /* --> literal string to use */

3link

4linkconsole.log(queryBuilder.getStatement()); // SKIP toInteger(3 * rand()) + 1

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

linkSkip by using a number

That way, a Bind Parameter is used

1linkconst queryBuilder = new QueryBuilder().skip(5);

2link

3linkconsole.log(queryBuilder.getStatement()); // SKIP $skip

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

LimitLimit by using a literal stringLimit by using a numberSkipSkip by using a literal stringSkip by using a number

Introduction Getting Started

Modelschevron_right

Sessions and Transactions

Query Builderchevron_right
Query Runnerchevron_right

Bind Parameters

Where Parameters