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'
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientservoy sSummary12%30%58%height: 30px;3Property SummaryCreate an AND-condition to add conditions to.
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
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.
/** @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)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
having
Table Row (tr)
id
name
Table Cell (td)
having
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Get the having-part of the query, used to add conditions. The conditions added here are AND-ed.
/** @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)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
joins
Table Row (tr)
id
name
Table Cell (td)
joins
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Get the joins clause of this table based clause. Joins added to this clause will be based on this table clauses table.
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 getret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetDataSourcename
getDataSource()
dessIndent
Returns the datasource for this.
ret
Returns
sIndent the dataSourceclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetParametername
getParameter(name)
dessIndent
Get or create a parameter for the query, this used to parameterize queries.
prs
Parameters
sIndentnamethe name of the parameterret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowgetTableAliasname
getTableAlias()
dessIndent
Returns the table alias for this.
ret
Returns
sIndent the tableAliasclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowinlinename
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 inlineret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRowinlinename
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 columnret