Skip to main content

Function: selectBuilder()

selectBuilder(collection, select, letExpr?, where?, orderBy?, limit?, offset?, useExpr?, groupByExpr?, lettingExpr?, havingExpr?, plainJoinExpr?, ignoreCase?): string

Defined in: query/helpers/builders.ts:62

Build a SELECT N1QL query from user-specified parameters. https://docs.couchbase.com/server/6.5/n1ql/n1ql-language-reference/select-syntax.html

Parameters​

collection​

string

Collection name

select​

SELECT Clause

string | ISelectType[]

letExpr?​

LetExprType

LET Clause

where?​

LogicalWhereExpr<any>

WHERE Clause

orderBy?​

Record<string, SortType>

ORDER BY Clause

limit?​

number

LIMIT Clause

offset?​

number

OFFSET Clause

useExpr?​

string[]

USE Clause

groupByExpr?​

IGroupBy[]

GROUP BY Clause

lettingExpr?​

LetExprType

LETTING Clause

havingExpr?​

LogicalWhereExpr<any>

HAVING Clause

plainJoinExpr?​

string

PLAIN JOIN string definition

ignoreCase?​

boolean

boolean to ignore case

Returns​

string

N1QL SELECT Query