Child pages
  • JSColumn

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
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


HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#DATETIME
Constant used when setting or getting the type of columns.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#INTEGER
Constant used when setting or getting the type of columns.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#MEDIA
Constant used when setting or getting the type of columns.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#NUMBER
Constant used when setting or getting the type of columns.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#TEXT
Constant used when setting or getting the type of columns.

HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#getAllowNull()
Get the allow-null flag of the column.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getDataProviderID()
Get the data provider id (name) for this column.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getDescription()
Get the description property of the column.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getForeignType()
Get the foreign type of the column.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getLength()
Get the length of the column as reported by the JDBC driver.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getQualifiedName()
Get the qualified name (including table name) of the column as known by the database.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getQuotedSQLName()
Returns a quoted version of the column name, if necessary, as defined by the actual database used.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getSQLName()
Get the name of the column as known by the database.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getScale()
Get the scale of the column as reported by the JDBC driver.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getTitle()
Get the title property of the column.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getType()
Get the JDBC type of the column.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#getTypeAsString()
Get the name JDBC type of the column.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#isRowIdentifier()
Is this column one of the row identifiers for its table.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#isUUID()
Is this column marked as UUID column.

HTML Table
idconstant
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Constants Details
Table Body (tbody)
idDATETIME
classnode
Table Row (tr)
idname
Table Cell (td)
DATETIME
Table Row (tr)
iddes
Table Cell (td)
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('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)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idINTEGER
classnode
Table Row (tr)
idname
Table Cell (td)
INTEGER
Table Row (tr)
iddes
Table Cell (td)
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('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)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idMEDIA
classnode
Table Row (tr)
idname
Table Cell (td)
MEDIA
Table Row (tr)
iddes
Table Cell (td)
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('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)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idNUMBER
classnode
Table Row (tr)
idname
Table Cell (td)
NUMBER
Table Row (tr)
iddes
Table Cell (td)
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('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)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idTEXT
classnode
Table Row (tr)
idname
Table Cell (td)
TEXT
Table Row (tr)
iddes
Table Cell (td)
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('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)
classlastDetailRow
Table Cell (td)


HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idgetAllowNull
classnode
Table Row (tr)
idname
Table Cell (td)
getAllowNull
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
getAllowNull
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the allow-null flag of the column.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – boolean allow-null flag.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customerid')
if (!column.getAllowNull())
{
	 // column cannot be null
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetDataProviderID
classnode
Table Row (tr)
idname
Table Cell (td)
getDataProviderID
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getDataProviderID
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the data provider id (name) for this column.
Table Row (tr)
idret
Table Cell (td)
Returns
String – String dataprovider id.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customerid')
var dataProviderId = column.getDataProviderID()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetDescription
classnode
Table Row (tr)
idname
Table Cell (td)
getDescription
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getDescription
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the description property of the column.
Table Row (tr)
idret
Table Cell (td)
Returns
String – String column description.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customername')
var desc = column.getDescription()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetForeignType
classnode
Table Row (tr)
idname
Table Cell (td)
getForeignType
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getForeignType
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the foreign type of the column.
The foreign type can be defined design time as a foreign key reference to another table.
Table Row (tr)
idret
Table Cell (td)
Returns
String – String foreign type.
Table Row (tr)
idsee
Table Cell (td)
Also see
Div
classsIndent
databaseManager.mergeRecords
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customerid')
var foreignType = column.getForeignType()
if (foreignType != null)
{
	var fkTable = databaseManager.getTable('example_data', foreignType)
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetLength
classnode
Table Row (tr)
idname
Table Cell (td)
getLength
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getLength
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the length of the column as reported by the JDBC driver.
Table Row (tr)
idret
Table Cell (td)
Returns
Number – int column length.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customername')
if (column.getLength() < 10)
{
	 // handle short column
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetQualifiedName
classnode
Table Row (tr)
idname
Table Cell (td)
getQualifiedName
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getQualifiedName
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
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.
Table Row (tr)
idret
Table Cell (td)
Returns
String – String qualified column name.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customerid')
var qualifiedSqlName = column.getQualifiedName()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetQuotedSQLName
classnode
Table Row (tr)
idname
Table Cell (td)
getQuotedSQLName
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getQuotedSQLName
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a quoted version of the column name, if necessary, as defined by the actual database used.
Table Row (tr)
idret
Table Cell (td)
Returns
String – column name, quoted if needed.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
//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])
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetSQLName
classnode
Table Row (tr)
idname
Table Cell (td)
getSQLName
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getSQLName
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the name of the column as known by the database.
Table Row (tr)
idret
Table Cell (td)
Returns
String – String sql name
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customerid')
var sqlName = column.getSQLName()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetScale
classnode
Table Row (tr)
idname
Table Cell (td)
getScale
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getScale
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the scale of the column as reported by the JDBC driver.
Table Row (tr)
idret
Table Cell (td)
Returns
Number – int column scale.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customername')
var scale = column.getScale()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetTitle
classnode
Table Row (tr)
idname
Table Cell (td)
getTitle
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getTitle
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the title property of the column.
Table Row (tr)
idret
Table Cell (td)
Returns
String – String column title.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customername')
var title = column.getTitle()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetType
classnode
Table Row (tr)
idname
Table Cell (td)
getType
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getType
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
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
Table Row (tr)
idret
Table Cell (td)
Returns
Number – int sql type.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('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)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetTypeAsString
classnode
Table Row (tr)
idname
Table Cell (td)
getTypeAsString
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
getTypeAsString
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get the name JDBC type of the column.
The same mapping as defined in JSColumn.getType() is applied.
Table Row (tr)
idret
Table Cell (td)
Returns
String – String sql name.
Table Row (tr)
idsee
Table Cell (td)
Also see
Div
classsIndent
.getType
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('customerid')
var typeName = column.getTypeAsString()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idisRowIdentifier
classnode
Table Row (tr)
idname
Table Cell (td)
isRowIdentifier
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
isRowIdentifier
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Is this column one of the row identifiers for its table.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – boolean true if is row identifier else false.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('orderid')
if (column.isRowIdentifier())
{
	 // handle pk column
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idisUUID
classnode
Table Row (tr)
idname
Table Cell (td)
isUUID
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
isUUID
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Is this column marked as UUID column.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – boolean true if is marked as UUID columns else false.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var table = databaseManager.getTable('example_data', 'orders')
var column = table.getColumn('orderid')
if (column.isUUID())
{
	 // handle UUID column
}
Table Row (tr)
classlastDetailRow
Table Cell (td)