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.
getRowIdentifierType() Returns a quoted version of the column name, if necessary, as defined by the actual database used.Get the row identifier type of the column.
getSequenceType() Get the raw JDBC type of the column, which allows to check database specific types, like sting/byte column type variations.Get the scale of the column as reported by the JDBC driver.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getSequenceType())
{
case JSColumn.NONE:
// handle column with no sequence
break;
case JSColumn.UUID_GENERATOR:
// handle uuid generated column
break;
}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getSequenceType())
{
case JSColumn.NONE:
// handle column with no sequence
break;
case JSColumn.UUID_GENERATOR:
// handle uuid generated column
break;
}
sIdentjavascriptlastDetailRow MEDIAname
MEDIA
dessIndentConstant used when setting or getting the type of columns.ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow NONEname
NONE
dessIndentConstant for column information indicating unset values.ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow NUMBERname
NUMBER
dessIndentConstant used when setting or getting the type of columns.ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow PK_COLUMNname
PK_COLUMN
dessIndentConstant used when setting or getting the row identifier type of columns.
Table Row (tr)
id
ret
tdThis value identifies columns that are defined as primary key in the database.ret
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
if (!column.getAllowNull())
{
// column cannot be null
}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var dataProviderId = column.getDataProviderID()
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var foreignType = column.getForeignType()
if (foreignType != null)
{
var fkTable = databaseManager.getTable('example_data', foreignType)
}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
if (column.getLength() < 10)
{
// handle short column
}
Get the qualified name (including table name) of the column as known by the database. The name is quoted, if necessary, as defined by the actual database used.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var qualifiedSqlName = column.getQualifiedName()
//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()
var jsColumn = jsTable.getColumn('active')
var quotedColumnName = jsColumn.getQuotedSQLName()
plugins.rawSQL.executeSQL('udm', quotedTableName, 'select * from ' + quotedTableName + ' where ' + quotedColumnName + ' = ?', [1])
Get the sequence type of the column. The sequence type is one of: - JSColumn.NONE - JSColumn.SERVOY_SEQUENCE - JSColumn.DATABASE_SEQUENCE - JSColumn.DATABASE_IDENTITY - JSColumn.UUID_GENERATOR;
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getSequenceType())
{
case JSColumn.NONE:
// handle column with no sequence
break;
case JSColumn.UUID_GENERATOR:
// handle uuid generated column
break;
}
Get the JDBC type of the column. The type reported by the JDBC driver will be mapped to one of: - JSColumn.DATETIME - JSColumn.TEXT - JSColumn.NUMBER - JSColumn.INTEGER - JSColumn.MEDIA
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getType())
{
case JSColumn.TEXT:
// handle text column
break;
case JSColumn.NUMBER:
case JSColumn.INTEGER:
// handle numerical column
break;
}
Check a flag of the column. The flags are a bit pattern consisting of 1 or more of the following bits: - JSColumn.UUID_COLUMN - JSColumn.EXCLUDED_COLUMN
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getType())
{
case JSColumn.TEXT:
// handle text column
break;
case JSColumn.NUMBER:
case JSColumn.INTEGER:
// handle numerical column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
EXCLUDED_COLUMN
Table Row (tr)
id
name
Table Cell (td)
EXCLUDED_COLUMN
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant used when setting or getting the flags of columns. This flag identifies columns that are skipped in the sql.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getType())
{
case JSColumn.TEXT:
// handle text column
break;
case JSColumn.NUMBER:
case JSColumn.INTEGER:
// handle numerical column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
MEDIA
Table Row (tr)
id
name
Table Cell (td)
MEDIA
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant used when setting or getting the type of columns.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getType())
{
case JSColumn.TEXT:
// handle text column
break;
case JSColumn.NUMBER:
case JSColumn.INTEGER:
// handle numerical column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
NONE
Table Row (tr)
id
name
Table Cell (td)
NONE
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant for column information indicating unset values.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getSequenceType())
{
case JSColumn.NONE:
// handle column with no sequence
break;
case JSColumn.UUID_GENERATOR:
// handle uuid generated column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
NUMBER
Table Row (tr)
id
name
Table Cell (td)
NUMBER
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant used when setting or getting the type of columns.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getType())
{
case JSColumn.TEXT:
// handle text column
break;
case JSColumn.NUMBER:
case JSColumn.INTEGER:
// handle numerical column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
PK_COLUMN
Table Row (tr)
id
name
Table Cell (td)
PK_COLUMN
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant used when setting or getting the row identifier type of columns. This value identifies columns that are defined as primary key in the database.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getRowIdentifierType())
{
case JSColumn.NONE:
// handle normal column
break;
case JSColumn.PK_COLUMN:
// handle database pk column
break;
case JSColumn.ROWID_COLUMN:
// handle developer defined pk column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
ROWID_COLUMN
Table Row (tr)
id
name
Table Cell (td)
ROWID_COLUMN
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant used when setting or getting the row identifier type of columns. This value identifies columns that are defined as primary key by the developer (but not in the database).
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getSequenceType())
{
case JSColumn.NONE:
// handle column with no sequence
break;
case JSColumn.UUID_GENERATOR:
// handle uuid generated column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
TEXT
Table Row (tr)
id
name
Table Cell (td)
TEXT
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant used when setting or getting the type of columns.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getType())
{
case JSColumn.TEXT:
// handle text column
break;
case JSColumn.NUMBER:
case JSColumn.INTEGER:
// handle numerical column
break;
}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Â
Table Body (tbody)
id
UUID_COLUMN
Table Row (tr)
id
name
Table Cell (td)
UUID_COLUMN
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
Constant used when setting or getting the flags of columns. This flag identifies columns whose values are treated as UUID.
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
switch (column.getSequenceType())
{
case JSColumn.NONE:
// handle column with no sequence
break;
case JSColumn.UUID_GENERATOR:
// handle uuid generated column
break;
}
dessIndentConstant used when setting or getting the row identifier type of columns. This value identifies columns that are defined as primary key by the developer (but not in the database).ret
dessIndentGet the qualified name (including table name) of the column as known by the database. The name is quoted, if necessary, as defined by the actual database used.ret
dessIndentGet the sequence type of the column. The sequence type is one of: - JSColumn.NONE - JSColumn.SERVOY_SEQUENCE - JSColumn.DATABASE_SEQUENCE - JSColumn.DATABASE_IDENTITY - JSColumn.UUID_GENERATOR;ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow getTitlename
getTitle()
dessIndentGet the title property of the column.ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow getTypename
getType()
dessIndentGet the JDBC type of the column. The type reported by the JDBC driver will be mapped to one of: - JSColumn.DATETIME - JSColumn.TEXT - JSColumn.NUMBER - JSColumn.INTEGER - JSColumn.MEDIAret
dessIndentGet the name JDBC type of the column. The same mapping as defined in JSColumn.getType() is applied.ret
Returns
sIndentclients
Supported Clients
sIndentSmartClient,WebClient,NGClientsam
Sample
sIdentjavascriptlastDetailRow hasFlagname
hasFlag(flag)
dessIndentCheck a flag of the column. The flags are a bit pattern consisting of 1 or more of the following bits: - JSColumn.UUID_COLUMN - JSColumn.EXCLUDED_COLUMNprs