Child pages
  • QBTableClause

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{div:style=display: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.\\ \\ Enter additional information related to this 'class' inside the \{div} macro with 'id=description'{div} {div:id=description}{div}\\ {table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[QBColumns]{td}{td}[#columns] Get columns from query{td}{tr}{tbody}{tbody}{tr}{td}[QBJoins]{td}{td}[#joins] Get the joins clause of this table based clause.{td}{tr}{tbody}{tbody}{tr}{td}[QBTableClause]{td}{td}[#parent] Get query builder parent table clause, this may be a query or a join clause.{td}{tr}{tbody}{tbody}{tr}{td}[QBSelect]{td}{td}[#root] Get query builder parent.{td}{tr}{tbody}{table}\\ {table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[QBColumn]{td}{td}[#getColumn]\(name) Get a column from the table.{td}{tr}{tbody}{tbody}{tr}{td}[QBColumn]{td}{td}[#getColumn]\(columnTableAlias, name) Get a column from the table with given alias.{td}{tr}{tbody}{table}\\ {table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=columns}{tr:id=name}{td}h6.columns{td}{tr}{tr:id=des}{td}{div:class=sIndent}Get columns from query{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBColumns]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} foundset.getQuery().columns {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=joins}{tr:id=name}{td}h6.joins{td}{tr}{tr:id=des}{td}{div:class=sIndent}
Wiki Markup
Cache
indextrue
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.Get query builder parent table clause, this may be a query or a join clause.Get query builder parent.

servoy sSummary12%30%58%height: 30px;3Methods SummaryGet a column from the table.Get a column from the table with given alias.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.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBJoins]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} foundset.getQuery().joins {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=parent}{tr:id=name}{td}h6.parent{td}{tr}{tr:id=des}{td}{div:class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowparentname

parent

dessIndent
Get query builder parent table clause, this may be a query or a join clause.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBTableClause]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} /** @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) {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=root}{tr:id=name}{td}h6.root{td}{tr}{tr:id=des}{td}{div:class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowrootname

root

dessIndent
Get query builder parent.
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBSelect]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} /** @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) {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ {table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getColumn-String}{tr:id=name}{td}h6.getColumn{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[QBColumn]{span}{span:style=font-weight: bold;}getColumn{span}{span}\(name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}
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.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} name -- the name of column to get {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBColumn]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} foundset.getQuery().getColumn('orderid') {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getColumn-String_String}{tr:id=name}{td}h6.getColumn{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[QBColumn]{span}{span:style=font-weight: bold;}getColumn{span}{span}\(columnTableAlias, name){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}
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.
{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} columnTableAlias -- the alias for the table \{[String]} name -- the name of column to get {div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[QBColumn]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} foundset.getQuery().getColumn('orderid', 'opk') {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{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
lastDetailRowgetDataSourcename

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