Child pages
  • QBTableClause

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Divcache
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)
QBColumns
Table Cell (td)
columns
Get columns from query
Table Row (tr)
Table Cell (td)
QBJoins
Table Cell (td)joins
styleindexdisplay:none

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.

true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

Table Cell (td)
QBTableClause
Table Cell (td)parent
servoy sSummary12%30%58%height: 30px;3Property SummaryGet all the columns of the datasource that can be used for this query (select or where clause)Get the joins clause of this table based clause. Table Row (tr)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 query builder parent.

HTML Table

idclassservoy sSummary

Colgroup Tag
Col
width80px
Col
Table Head (thead) Table Row (tr)style Table Row (tr)
Table Cell (td)
QBColumn
Table Cell (td)getColumn(name)
servoy sSummary12%30%58%height: 30px;
Table Head (th)
colspan2
Method Summary
Table Row (tr)
Table Cell (td)
QBColumn
Table Cell (td)getColumn(columnTableAlias, name)
3Methods SummaryGet a column from the table.Get a column from the table with given alias. HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Details
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)
idjoins
Table Row (tr)
idname
Table Cell (td)

joins

Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
.Returns the datasource for this.Returns the table alias for this.

propertyservoy sDetail2100%height:30px2Property Detailscolumnsname

columns

dessIndentGet 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 joinsname

joins

dessIndentGet the joins clause of this table based clause.

Joins added to this clause will be based on this table clauses table. Table Row (tr)idtdret

Returns

divsIndentclients

class Table Row (tr)

idsam
td

Supported Clients

sIndent
QBJoins Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
SmartClient,WebClient,NGClientsam

Sample

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

parent

sIdentjavascriptlastDetailRow parentname

parent

dessIndentGet query builder parent table clause, this may be a query or a join clause.
Table Row (tr)idtdret

Returns

divsIndentclients

classtd

Supported Clients

sIndent
QBTableClause Table Row (tr)
idsam
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
SmartClient,WebClient,NGClientsam

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)
sIdentjavascriptlastDetailRow&nbsp;rootname

root

dessIndentGet query builder parent.
Table Row (tr)idret

Table Cell (td)

Returns

divsIndentclients

classid

Supported Clients

sIndent
QBSelect Table Row (tr)SmartClient,WebClient,NGClientsam

Table Cell (td)

Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
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

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)
 
HTML Table
idfunction
classservoy sDetail
sIdentjavascriptlastDetailRow&nbsp;

functionservoy sDetail2100%height:30px2Methods DetailsgetColumnname

getColumn(name)

dessIndentGet a column from the table.
Table Row (tr)idprs

Table Cell (td)

Parameters

Divclass

sIndent{String} name - the name of column to get Table Row (tr)idtdret

Returns

divsIndentclients

classtd

Supported Clients

sIndent
QBColumn Table Row (tr)
idsam
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
SpanSmartClient,WebClient,NGClientsam

Sample

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

getColumn(columnTableAlias, name)

Table Row (tr)id Table Cell (td) DivclassdessIndentGet 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)idtdprs

Parameters

div

classsIndent{String} columnTableAlias - the alias for the table
{String} name - the name of column to getret

tr

Returns

idsIndentclients

ret

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) 

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getDataSourcename

getDataSource()

dessIndentReturns the datasource for this.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;
getTableAliasname

getTableAlias()

dessIndentReturns the table alias for this.ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow&nbsp;