Skip to end of metadata
Go to start of metadata

Refresh page Jun 19, 2019 21:34

Supported Clients
SmartClient WebClient NGClient

Methods Summary
JSColumn getColumn(name) Returns a JSColumn for the named column (or column dataproviderID).
Array getColumnNames() Returns an array containing the names of all table columns.
String getDataSource() Returns the table data source uri.
String getQuotedSQLName() Returns a quoted version of the table name, if necessary, as defined by the actual database used.
Array getRowIdentifierColumnNames() Returns an array containing the names of the identifier (PK) column(s).
String getSQLName() Returns the table name.
String getServerName() Returns the Servoy server name.
Boolean isMetadataTable() Returns whether table was flagged as metadata table.

Methods Details

getColumn(name)

Returns a JSColumn for the named column (or column dataproviderID).

Parameters

String name The name of the column to return the value from.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var jsTable = databaseManager.getTable('udm', 'campaigns')
var jsColumn = jsTable.getColumn('campaign_name')

getColumnNames()

Returns an array containing the names of all table columns.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var jsTable = databaseManager.getTable('udm', 'campaigns')
var columnNames = jsTable.getColumnNames()

getDataSource()

Returns the table data source uri.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var jsTable = databaseManager.getTable('udm', 'campaigns')
var dataSource = jsTable.getDataSource()

getQuotedSQLName()

Returns a quoted version of the table name, if necessary, as defined by the actual database used.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

//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])

getRowIdentifierColumnNames()

Returns an array containing the names of the identifier (PK) column(s).

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var jsTable = databaseManager.getTable('udm', 'campaigns')
var identifierColumnNames = jsTable.getRowIdentifierColumnNames()

getSQLName()

Returns the table name.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var jsTable = databaseManager.getTable('udm', 'campaigns')
var tableNameForDisplay = jsTable.getSQLName()

getServerName()

Returns the Servoy server name.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var jsTable = databaseManager.getTable('udm', 'campaigns')
var serverName = jsTable.getServerName()

isMetadataTable()

Returns whether table was flagged as metadata table.

Returns

Supported Clients

SmartClient,WebClient,NGClient

Sample

var jsTable = databaseManager.getTable('udm', 'campaigns')
var isMetaDataTable = jsTable.isMetadataTable()

  • No labels