Skip to content

Latest commit

 

History

History
276 lines (150 loc) · 6.42 KB

File metadata and controls

276 lines (150 loc) · 6.42 KB

@onzag/itemize / Modules / database/base / QueryBuilder

Class: QueryBuilder

database/base.QueryBuilder

Reprents the basic query builder to build a bit of a query or the entire query itself and this class is supposed to be extended by other builders

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new QueryBuilder(): QueryBuilder

Constructs a new query

Returns

QueryBuilder

Defined in

database/base.ts:62

Properties

bindingSources

Private bindingSources: ExtendedBindingType[] = []

These are all the bindings that are used by the query builder in order

Defined in

database/base.ts:57

Methods

addBindingSource

addBindingSource(value): void

Adds a binding source to the binding source list in order

Parameters

Name Type Description
value ExtendedBindingType the binding source to add

Returns

void

Defined in

database/base.ts:69


addBindingSources

addBindingSources(values): void

Adds many binding sources to the bindings sources list

Parameters

Name Type Description
values ExtendedBindingType[] the binding sources to add

Returns

void

Defined in

database/base.ts:77


clearBindingSources

clearBindingSources(): void

Removes all binding sources

Returns

void

Defined in

database/base.ts:105


compile

compile(): string

Returns the result of the compilation of the query this function needs to be overriden

Returns

string

Defined in

database/base.ts:121


getBindings

getBindings(): BasicBindingType[]

Provides the bindings for the query in order that should match the compilation

Returns

BasicBindingType[]

a list of basic bindings

Defined in

database/base.ts:168


popBindingSource

popBindingSource(): ExtendedBindingType

Removes the last added biding source and returns it

Returns

ExtendedBindingType

Defined in

database/base.ts:112


shiftBindingSource

shiftBindingSource(value): void

Adds a binding source at the start of the bindings source list

Parameters

Name Type Description
value ExtendedBindingType the binding source to add

Returns

void

Defined in

database/base.ts:89


shiftBindingSources

shiftBindingSources(values): void

Adds many binding sources at the start of the bindings source list

Parameters

Name Type Description
values ExtendedBindingType[] the binding sources to add

Returns

void

Defined in

database/base.ts:98


toSQL

toSQL(): IQueryBuilderSQLResult

Returns the SQL result for usage in the query builder

Returns

IQueryBuilderSQLResult

a sql builder result with the bindings and the query itself

Defined in

database/base.ts:129