Child pages
  • QBTableClause

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
QBColumns
Table Cell (td)
#columns
Get columns from query

...

Table Cell (td)
QBJoins

...

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'
Divcache
styleindexdisplay:none

...

iddescription

...

padding0px
width80px

...

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

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 Cell (td)
QBTableClause

...

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

...

Table Cell (td)
QBSelect

...

Get query builder parent.

...

...

padding0px
width80px

...

servoy sSummary12%30%58%height: 30px;

...

Table Head (th)
colspan2
Method Summary

...

Table Cell (td)
QBColumn

...

Table Cell (td)
QBColumn

...

3Methods SummaryGet a column from the table.

...

Get a column from the table with given alias

...

idproperty
classservoy sDetail

...

padding0px
width100%
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Property Details

...

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

...

classlastDetailRow

...

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

...

classlastDetailRow

...

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)

...

classlastDetailRow

...

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)

...

classlastDetailRow

...

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
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
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
td.Returns the datasource for this.Returns the table alias for this.

propertyservoy sDetail2100%height:30px2Property Detailscolumnsname

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
lastDetailRowjoinsname

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
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
rootname

root

dessIndent
Get query builder parent.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsgetColumnname

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
lastDetailRowgetColumnname

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
getTableAliasname

getTableAlias()

dessIndent
Returns the table alias for this.
ret

Returns

sIndent the tableAlias
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow