Child pages
  • JSTable

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{hidden} DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden} {sub-section:description|text=}{sub-section}\\{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[JSColumn]{td}{td}[#getColumn]\(name) Returns a JSColumn for the named column.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getColumnNames]\() Returns an array containing the names of all table columns.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getQuotedSQLName]\() Returns a quoted version of the table name, if necessary, as defined by the actual database used.{td}{tr}{tbody}{tbody}{tr}{td}[String]\[]{td}{td}[#getRowIdentifierColumnNames]\() Returns an array containing the names of the identifier (PK) column(s).{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getSQLName]\() Returns the table name.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getServerName]\() Returns the Servoy server name.{td}{tr}{tbody}{table}\\{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=9D85C6E8-C7A9-4042-9D0D-B6B12B15833F}{tr:id=name}{td}h6.getColumn{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[JSColumn]{span}{span:id=iets|style=float: left; font-weight: bold;}getColumn{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_des|text=|trigger=button}{sub-section}{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_des|trigger=none|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;3Methods SummaryReturns a JSColumn for the named column (or column dataproviderID).Returns an array containing the names of all table columns.Returns the table data source uri.Returns a quoted version of the table name, if necessary, as defined by the actual database used.Returns an array containing the names of the identifier (PK) column(s).Returns the table name.Returns the Servoy server name.Returns whether table was flagged as metadata table.

functionservoy sDetail2100%height:30px2Methods DetailsgetColumnname

getColumn(name)

dessIndent
Returns a JSColumn for the named column (or column
.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_prs|trigger=none}name -- The name of the column to return the value from. {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_ret|text=|trigger=button}{sub-section}{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_ret|trigger=none|class=sIndent}[JSColumn] -- JSColumn column.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_see|text=|trigger=button}{sub-section}{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_see|text=|trigger=button}{sub-section}{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_sam|text=|trigger=button}{sub-section}{sub-section:9D85C6E8-C7A9-4042-9D0D-B6B12B15833F_sam|class=sIndent|trigger=none}{code:language=javascript} var jsTable = databaseManager.getTable('udm', 'campaigns') var jsColumn = jsTable.getColumn('campaign_name') {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=74474414-0E0A-44A2-ACEC-5A39B5B6E05F}{tr:id=name}{td}h6.getColumnNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getColumnNames{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_des|text=|trigger=button}{sub-section}{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_des|trigger=none|class=sIndent}
 dataproviderID).
prs

Parameters

sIndentnameThe name of the column to return the value from.
ret

Returns

sIndent JSColumn column.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getColumnNamesname

getColumnNames()

dessIndent
Returns an array containing the names of all table columns.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_ret|text=|trigger=button}{sub-section}{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_ret|trigger=none|class=sIndent}[String]\[] -- String array of column names.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_see|text=|trigger=button}{sub-section}{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_see|text=|trigger=button}{sub-section}{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_sam|text=|trigger=button}{sub-section}{sub-section:74474414-0E0A-44A2-ACEC-5A39B5B6E05F_sam|class=sIndent|trigger=none}{code:language=javascript} var jsTable = databaseManager.getTable('udm', 'campaigns') var columnNames = jsTable.getColumnNames() {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=AFE4199F-43CD-4D5D-8B62-6DB237B2D601}{tr:id=name}{td}h6.getQuotedSQLName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getQuotedSQLName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_des|text=|trigger=button}{sub-section}{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_des|trigger=none|class=sIndent}

If the table is in mem, then the internal rowid column name is not returned.
ret

Returns

sIndent String array of column names.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDataSourcename

getDataSource()

dessIndent
Returns the table data source uri.
ret

Returns

sIndent String datasource uri.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getQuotedSQLNamename

getQuotedSQLName()

dessIndent
Returns a quoted version of the table name, if necessary, as defined by the actual database used.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_ret|text=|trigger=button}{sub-section}{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_ret|trigger=none|class=sIndent}[String] -- String table name, quoted if needed.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_see|text=|trigger=button}{sub-section}{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_see|text=|trigger=button}{sub-section}{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_sam|text=|trigger=button}{sub-section}{sub-section:AFE4199F-43CD-4D5D-8B62-6DB237B2D601_sam|class=sIndent|trigger=none}{code:language=javascript} //use with the raw SQL plugin: //if the table name contains characters that are illegal in sql, the table name will be quoted var jsTable = databaseManager.getTable('udm', 'campaigns') var quotedTableName = jsTable.getQuotedSQLName() plugins.rawSQL.executeSQL('udm', quotedTableName, 'select * from ' + quotedTableName + ' where is_active = ?', [1]) {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=E0E6C259-0E03-4DD8-9386-80275916A4B3}{tr:id=name}{td}h6.getRowIdentifierColumnNames{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]\[]{span}{span:id=iets|style=float: left; font-weight: bold;}getRowIdentifierColumnNames{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_des|text=|trigger=button}{sub-section}{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_des|trigger=none|class=sIndent}Returns an array containing the names of the identifier (PK) column(s).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_ret|text=|trigger=button}{sub-section}{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_ret|trigger=none|class=sIndent}[String]\[] -- String array of row identifier column names.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_see|text=|trigger=button}{sub-section}{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_see|text=|trigger=button}{sub-section}{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_sam|text=|trigger=button}{sub-section}{sub-section:E0E6C259-0E03-4DD8-9386-80275916A4B3_sam|class=sIndent|trigger=none}{code:language=javascript} var jsTable = databaseManager.getTable('udm', 'campaigns') var identifierColumnNames = jsTable.getRowIdentifierColumnNames() {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3BEFA3A1-A370-4969-8B12-38CBF07CCA3D}{tr:id=name}{td}h6.getSQLName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getSQLName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_des|text=|trigger=button}{sub-section}{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_des|trigger=none|class=sIndent}Returns the table name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_ret|text=|trigger=button}{sub-section}{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_ret|trigger=none|class=sIndent}[String] -- String table name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_see|text=|trigger=button}{sub-section}{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_see|text=|trigger=button}{sub-section}{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_sam|text=|trigger=button}{sub-section}{sub-section:3BEFA3A1-A370-4969-8B12-38CBF07CCA3D_sam|class=sIndent|trigger=none}{code:language=javascript} var jsTable = databaseManager.getTable('udm', 'campaigns') var tableNameForDisplay = jsTable.getSQLName() {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA}{tr:id=name}{td}h6.getServerName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getServerName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_des|text=|trigger=button}{sub-section}{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_des|trigger=none|class=sIndent}Returns the Servoy server name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_ret|text=|trigger=button}{sub-section}{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_ret|trigger=none|class=sIndent}[String] -- String server name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_see|text=|trigger=button}{sub-section}{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_see|text=|trigger=button}{sub-section}{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_sam|text=|trigger=button}{sub-section}{sub-section:2CAE44D0-DEC4-42A6-AEC8-30DC45ECC9CA_sam|class=sIndent|trigger=none}{code:language=javascript} var jsTable = databaseManager.getTable('udm', 'campaigns') var serverName = jsTable.getServerName() {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
ret

Returns

sIndent String table name, quoted if needed.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetRowIdentifierColumnNamesname

getRowIdentifierColumnNames()

dessIndent
Returns an array containing the names of the identifier (PK) column(s).
 Please note that if the table is in mem, then the internal rowid column name is also returned.
ret

Returns

sIndent String array of row identifier column names.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSQLNamename

getSQLName()

dessIndent
Returns the table name.
ret

Returns

sIndent String table name.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getServerNamename

getServerName()

dessIndent
Returns the Servoy server name.
ret

Returns

sIndent String server name.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
isMetadataTablename

isMetadataTable()

dessIndent
Returns whether table was flagged as metadata table.
ret

Returns

sIndent boolean is metadata
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow