Child pages
  • QBSelect

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.
Enter additional information related to this 'class' inside the {div} macro with 'id=description'
Div
styledisplay:none
Div
iddescription
HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Row (tr)
Table Cell (td)
QBLogicalCondition
Table Cell (td)and
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable
idclass

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Property SummaryCreate an AND-condition to add conditions to.

Table Row (tr)
Table Cell (td)
QBColumns
Table Cell (td)
columns
Get columns from query
Table Row (tr)
Table Cell (td)
QBFunctions
Table Cell (td)functions
Table Row (tr)
Table Cell (td)
QBGroupBy
Table Cell (td)groupBy
Create an case searched expression.Get all the columns of the datasource that can be used for this query (select or where clause)Specifies a comment of the query.Get the functions clause from a query, used for functions that are not tied to a column.Get the group by clause from a query Table Row (tr)
Table Cell (td)
QBLogicalCondition
Table Cell (td)having
Get Get the having-part of the query, used to add conditions. Table Row (tr)
Table Cell (td)
QBJoins
Table Cell (td)joins
Table Row (tr)
Table Cell (td)
QBLogicalCondition
Table Cell (td)or
Get the joins clause of this table based clause.Create an OR-condition to add conditions to. Table Row (tr)
Table Cell (td)
QBParameters
Table Cell (td)params
Get the named parameters from a query. Table Row (tr)
Table Cell (td)
QBTableClause
Table Cell (td)parent
Table Row (tr)
Table Cell (td)
QBResult
Table Cell (td)result
Get the result Get query builder parent table clause, this may be a query or a join clause. Table Row (tr)
Table Cell (td)
QBSelect
Table Cell (td)root
Get the result part of the query, used to add result columns or values.Get query builder parent. Table Row (tr)
Table Cell (td)
QBSorts
Table Cell (td)sort
Get the sorting part of the query. Table Row (tr)
Table Cell (td)
QBWhereCondition
Table Cell (td)where
Get the where-part of the query, used to add conditions. HTML Table

Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
QBSelect
Table Cell (td)clearHaving()
servoy sSummaryid12%30%58%height: 30px;3Methods SummaryClear the having-part of the query. Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)exists()
Get an exists-condition from a subquery
Table Row (tr)
Table Cell (td)
QBColumn
Table Cell (td)
getColumn(name)
Get a column from the table.
Table Row (tr)
Table Cell (td)
QBColumn
Table Cell (td)getColumn(columnTableAlias, name)
Get a column from the table.Get a column from the table with given alias. Table Row (tr)
Table Cell (td)
QBParameter
Table Cell (td)getParameter()
Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)not(cond)
.Returns the datasource for this.Get or create a parameter for the query, this used to parameterize queries. Table Row (tr)
Table Cell (td)
QBCondition
Table Cell (td)not(cond)
Returns the table alias for this.Create an inlined value.Create an inlined value converted to the type of the column.Create an inlined (quoted) value.Create an negated condition.Create an negated condition. HTML Table

Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead) Table Row (tr)stylepropertyclassservoy sDetailservoy sDetail2100%height:30px; Table Head (th)colspan2Property Details Table Body (tbody)ididand Table Row (tr)name

Table Cell (td)

and

tr

iddes Table Cell (td) Divclass Table Cell (td)sIndent
Create an AND-condition to add conditions to.
Table Row (tr)
idret
ret

Returns

divsIndentclients

classtd

Supported Clients

sIndent
QBLogicalCondition Table Row (tr)
idsam
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idclearHaving
Table Row (tr)
idname
Table Cell (td)

clearHaving

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBSelect
Span
stylefont-weight: bold;
clearHaving
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Clear the having-part of the query.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBSelect
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var q = foundset.getQuery()
q.where.add(q.columns.x.eq(100))
query.groupBy.clear.root.clearHaving()
foundset.loadRecords(q);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idexists
Table Row (tr)
idname
Table Cell (td)

exists

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
exists
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get an exists-condition from a subquery
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBCondition
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
foundset.query.where.add(query.exists(query2))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetColumn-String
Table Row (tr)
idname
Table Cell (td)

getColumn

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBColumn
Span
stylefont-weight: bold;
getColumn
Span
(name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get a column from the table.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} name - the name of column to get
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBColumn
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
foundset.getQuery().getColumn('orderid')
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetColumn-String_String
Table Row (tr)
idname
Table Cell (td)

getColumn

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBColumn
Span
stylefont-weight: bold;
getColumn
Span
(columnTableAlias, name)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get a column from the table with given alias.
The alias may be of the main table or any level deep joined table.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{String} columnTableAlias - the alias for the table
{String} name - the name of column to get
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBColumn
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
foundset.getQuery().getColumn('orderid', 'opk')
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgetParameter
Table Row (tr)
idname
Table Cell (td)

getParameter

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBParameter
Span
stylefont-weight: bold;
getParameter
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get or create a parameter for the query, this used to parameterize queries.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBParameter
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
	var query = databaseManager.createSelect('db:/example_data/orders')
	query.where.add(query.columns.contact_id.eq(query.getParameter('mycontactid')))

	// load orders where contact_id = 100
	query.params['mycontactid'] = 100
	foundset.loadRecords(query)

	// load orders where contact_id = 200
	query.params['mycontactid'] = 200
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idnot-QBCondition
Table Row (tr)
idname
Table Cell (td)

not

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
not
Span
(cond)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an negated condition.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{QBCondition} cond - the condition to negate
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBCondition
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
foundset.query.where.add(query.not(query.columns.flag.eq(1)))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idnot-QBLogicalCondition
Table Row (tr)
idname
Table Cell (td)

not

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
QBCondition
Span
stylefont-weight: bold;
not
Span
(cond)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an negated condition.
Table Row (tr)
idprs
Table Cell (td)

Parameters

Div
classsIndent
{QBLogicalCondition} cond - the logical condition to negate
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBCondition
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
foundset.query.where.add(query.not(query.columns.flag.eq(1)))
Table Row (tr)
classlastDetailRow
Table Cell (td) SmartClient,WebClient,NGClientsam

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(
	  query.or
	    .add(
	      query.and
		    .add(query.columns.flag.eq(1))
	    .add(query.columns.order_date.isNull)
		 )
	    .add(
	      query.and
	        .add(query.columns.flag.eq(2))
	        .add(query.column.order_date.gt(new Date()))
	     )
	);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idcolumns
Table Row (tr)
idname
Table Cell (td)

columns

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get columns from query
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBColumns
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
foundset.getQuery().columns
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idfunctions
Table Row (tr)
idname
Table Cell (td)

functions

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the functions clause from a query, used for functions that are not tied to a column.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBFunctions
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders') //$NON-NLS-1$
query.where.add(query.columns.shipname.upper.eq(query.functions.upper('servoy'))) //$NON-NLS-1$
foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idgroupBy
Table Row (tr)
idname
Table Cell (td)

groupBy

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the group by clause from a query
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBGroupBy
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries
.root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0))
foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idhaving
Table Row (tr)
idname
Table Cell (td)

having

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the having-part of the query, used to add conditions.
The conditions added here are AND-ed.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBLogicalCondition
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
query.groupBy.addPk() // have to group by on pk when using having-conditions in (foundset) pk queries
.root.having.add(query.joins.orders_to_order_details.columns.quantity.count.eq(0))
foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idjoins
Table Row (tr)
idname
Table Cell (td)

joins

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the joins clause of this table based clause.
Joins added to this clause will be based on this table clauses table.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBJoins
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
foundset.getQuery().joins
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idor
Table Row (tr)
idname
Table Cell (td)

or

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Create an OR-condition to add conditions to.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBLogicalCondition
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
query.where.add(
	  query.or
	    .add(
	      query.and
		    .add(query.columns.flag.eq(1))
	    .add(query.columns.order_date.isNull)
		 )
	    .add(
	      query.and
	        .add(query.columns.flag.eq(2))
	        .add(query.column.order_date.gt(new Date()))
	     )
	);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idparams
Table Row (tr)
idname
Table Cell (td)

params

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the named parameters from a query.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBParameters
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
	var query = databaseManager.createSelect('db:/example_data/orders')
	query.where.add(query.columns.contact_id.eq(query.getParameter('mycontactid')))

	// load orders where contact_id = 100
	query.params['mycontactid'] = 100
	foundset.loadRecords(query)

	// load orders where contact_id = 200
	query.params['mycontactid'] = 200
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idparent
Table Row (tr)
idname
Table Cell (td)

parent

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get query builder parent table clause, this may be a query or a join clause.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBTableClause
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/person>} */
	var query = databaseManager.createSelect('db:/example_data/person')
	query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john'))
	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idresult
Table Row (tr)
idname
Table Cell (td)

result

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the result part of the query, used to add result columns or values.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBResult
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
query.result.add(query.columns.company_id).add(query.columns.customerid)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idroot
Table Row (tr)
idname
Table Cell (td)

root

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get query builder parent.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBSelect
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/order_details>} */
	var subquery = databaseManager.createSelect('db:/example_data/order_details')

 /** @type {QBSelect<db:/example_data/orders>} */
	var query = databaseManager.createSelect('db:/example_data/orders')
	query.where.add(query
		.or
			.add(query.columns.order_id.not.isin([1, 2, 3]))

			.add(query.exists(
					subquery.where.add(subquery.columns.orderid.eq(query.columns.order_id)).root
			))
		)

	foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idsort
Table Row (tr)
idname
Table Cell (td)

sort

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the sorting part of the query.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBSorts
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
/** @type {QBSelect<db:/example_data/orders>} */
var query = databaseManager.createSelect('db:/example_data/orders')
query.sort
.add(query.joins.orders_to_order_details.columns.quantity.desc)
.add(query.columns.companyid)
foundset.loadRecords(query)
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idwhere
Table Row (tr)
idname
Table Cell (td)

where

Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the where-part of the query, used to add conditions.
The conditions added here are AND-ed.
Table Row (tr)
idret
Table Cell (td)

Returns

Div
classsIndent
QBWhereCondition
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var query = foundset.getQuery()
query.where.add(query.columns.flag.eq(1))
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
HTML Table
idfunction
classservoy sDetail
sIdentjavascriptlastDetailRowcasename

case

dessIndent
Create an case searched expression.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
columnsname

columns

dessIndent
Get all the columns of the datasource that can be used for this query (select or where clause)
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
commentname

comment

dessIndent
Specifies a comment of the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
functionsname

functions

dessIndent
Get the functions clause from a query, used for functions that are not tied to a column.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
groupByname

groupBy

dessIndent
Get the group by clause from a query
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
havingname

having

dessIndent
Get the having-part of the query, used to add conditions.
The conditions added here are AND-ed.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
joinsname

joins

dessIndent
Get the joins clause of this table based clause.
Joins added to this clause will be based on this table clauses table.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
orname

or

dessIndent
Create an OR-condition to add conditions to.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
paramsname

params

dessIndent
Get the named parameters from a query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
parentname

parent

dessIndent
Get query builder parent table clause, this may be a query or a join clause.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
resultname

result

dessIndent
Get the result part of the query, used to add result columns or values.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
rootname

root

dessIndent
Get query builder parent.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
sortname

sort

dessIndent
Get the sorting part of the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
wherename

where

dessIndent
Get the where-part of the query, used to add conditions.
The conditions added here are AND-ed.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsclearHavingname

clearHaving()

dessIndent
Clear the having-part of the query.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
existsname

exists(query)

dessIndent
Get an exists-condition from a subquery
prs

Parameters

sIndentquerythe sub query
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getColumnname

getColumn(name)

dessIndent
Get a column from the table.
prs

Parameters

sIndentnamethe name of column to get
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getColumnname

getColumn(columnTableAlias, name)

dessIndent
Get a column from the table with given alias.
The alias may be of the main table or any level deep joined table.
prs

Parameters

sIndentcolumnTableAliasthe alias for the tablenamethe name of column to get
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataSourcename

getDataSource()

dessIndent
Returns the datasource for this.
ret

Returns

sIndent the dataSource
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getParametername

getParameter(name)

dessIndent
Get or create a parameter for the query, this used to parameterize queries.
prs

Parameters

sIndentnamethe name of the parameter
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTableAliasname

getTableAlias()

dessIndent
Returns the table alias for this.
ret

Returns

sIndent the tableAlias
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
inlinename

inline(number)

dessIndent
Create an inlined value. An inlined value is a value that will appear literally in the resulting sql.
 For example
 <pre>
 	query.where.add(query.columns.custid.eq(query.inline(200)))
 </pre>
 results in sql
 <pre>
 	where custid = 200
 </pre>
 And
 <pre>
 	query.where.add(query.columns.custid.eq(200))
 </pre>
 results in sql
 <pre>
 	where custid = ?
 </pre> with prepared statement value 200.
 <p>
 Inlined values can be used in situations where prepared statement expressions give sql problems, for example in some group-by clauses.
 <p>
 Note that using the same query with different inlined values effectively disables prepared statement caching for the query and may have a negative performance impact.
 <p>
 In case of a string will the value be validated, values that contain a single quote will not be inlined.
prs

Parameters

sIndentnumbervalue to inline
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
inlinename

inline(number, columnForType)

dessIndent
Create an inlined value converted to the type of the column.
prs

Parameters

sIndentnumbervalue to inlinecolumnForTypeconvert value to type of the column
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
inlinename

inline(string)

dessIndent
Create an inlined (quoted) value.
prs

Parameters

sIndentstringvalue to inline
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
notname

not(cond)

dessIndent
Create an negated condition.
prs

Parameters

sIndentcondthe condition to negate
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
notname

not(cond)

dessIndent
Create an negated condition.
prs

Parameters

sIndentcondthe logical condition to negate
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow