Child pages
  • JSColumn

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

styledisplay:none

...

iddescription

...

padding0px
width80px

...

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Constants Summary

...

Table Cell (td)
Number

...

Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Constants SummaryConstant used when setting or getting the sequence type of columns.

...

Table Cell (td)
Number
Constant used when setting or getting the sequence type of columns.

...

Table Cell (td)
Number

...

Constant used when setting or getting the type of columns.

...

Table Cell (td)
Number

...

Constant used when setting or getting the flags of columns.

...

Table Cell (td)
Number

...

Table Cell (td)
Number

...

Constant used when setting or getting the type of columns.Constant used when setting or getting the type of columns.

...

Constant used when setting or getting the

...

Table Cell (td)
Number

...

flags of columns.

...

Constant for column information indicating unset values.

...

Table Cell (td)
Number

...

Constant used when setting or getting the type of columns.

...

Table Cell (td)
Number

...

Constant used when setting or getting the row identifier type of columns.Constant used when setting or getting the row identifier type of columns.

...

Table Cell (td)
Number

...

Constant used when setting or getting the

...

sequence type of columns.

...

Table Cell (td)
Number

...

Constant used when setting or getting the

...

flags of columns.

...

Table Cell (td)
Number

...

Constant used when setting or getting the type of columns.

...

Table Cell (td)
Number

...

Constant used when setting or getting the flags of columns.

...

Table Cell (td)
Number

...

...

padding0px
width80px

...

Constant used when setting or getting the sequence type of columns.

...

servoy sSummary12%30%58%height: 30px;

...

Table Head (th)
colspan2
Method Summary

...

Table Cell (td)
Boolean

...

3Methods SummaryGet the allow-null flag of the column.

...

Table Cell (td)
String

...

Table Cell (td)
String

...

Get the data provider id for this column (which is the same as name if not explicitly defined otherwise).

...

Get the default format of the column.Get the description property of the column.

...

Table Cell (td)
String

...

Get the foreign type of the column.

...

Table Cell (td)
Number

...

Get the length of the column as reported by the JDBC driver

...

Table Cell (td)
String

...

.Get the name of the column as used by Servoy.Get the qualified name (including table name) of the column as known by the database.

...

Table Cell (td)
String

...

...

Table Cell (td)
Number

...

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.

...

Table Cell (td)
String

...

Get the name of the column as known by the database.

...

Table Cell (td)
Number

...

...

Table Cell (td)
Number

...

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.

...

...

Table Cell (td)
String

...

Get the sequence type of the column.

...

...

Table Cell (td)
Number

...

Get the JSTable of this column.Get the title property of the column.

...

Get the JDBC type of the column.

...

Table Cell (td)
String

...

Get the name JDBC type of the column.

...

Table Cell (td)
Boolean

...

Check a flag of the column.

...

constant

...

servoy sDetail

...

padding0px
width100%

...

2100%height:30px

...

colspan1

...

2Constants Details

...

DATABASE_IDENTITY

...

name

...

DATABASE_IDENTITY

...

des

...

sIndent
Constant used when setting or getting the sequence type of columns.

...

ret

...

Returns

...

sIndentclients

...

Supported Clients

sIndent

...

idsam
Table Row (tr)
idname
Table Cell (td)
ROWID_COLUMN
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idSERVOY_SEQUENCE
Table Row (tr)
idname
Table Cell (td)
SERVOY_SEQUENCE
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the sequence type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idTEXT
Table Row (tr)
idname
Table Cell (td)
TEXT
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idUUID_COLUMN
Table Row (tr)
idname
Table Cell (td)
UUID_COLUMN
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the flags of columns.
This flag identifies columns whose values are treated as UUID.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
if (column.hasFlag(JSColumn.UUID_COLUMN))
{
	// handle uuid column
}

...

classlastDetailRow

...

idUUID_GENERATOR
Table Row (tr)
idname
Table Cell (td)
UUID_GENERATOR
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the sequence type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

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
Table Row (tr)
idname
Table Cell (td)
getAllowNull
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
getAllowNull
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the allow-null flag of the column.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean – boolean allow-null flag.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/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
Table Row (tr)
idname
Table Cell (td)
getDataProviderID
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getDataProviderID
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the data provider id for this column (which is the same as name if not explicitly defined otherwise).
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String – String dataprovider id.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var dataProviderId = column.getDataProviderID()
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetDescription
Table Row (tr)
idname
Table Cell (td)
getDescription
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getDescription
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the description property of the column.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String – String column description.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
var desc = column.getDescription()
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetForeignType
Table Row (tr)
idname
Table Cell (td)
getForeignType
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getForeignType
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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
Div
classsIndent
String – String foreign type.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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)
}
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetLength
Table Row (tr)
idname
Table Cell (td)
getLength
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getLength
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the length of the column as reported by the JDBC driver.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number – int column length.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/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
Table Row (tr)
idname
Table Cell (td)
getQualifiedName
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getQualifiedName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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
Div
classsIndent
String – String qualified column name.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var qualifiedSqlName = column.getQualifiedName()
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetQuotedSQLName
Table Row (tr)
idname
Table Cell (td)
getQuotedSQLName
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getQuotedSQLName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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
Div
classsIndent
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)
idgetRowIdentifierType
Table Row (tr)
idname
Table Cell (td)
getRowIdentifierType
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getRowIdentifierType
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the row identifier type of the column.
The sequence type is one of:
- JSColumn.PK_COLUMN
- JSColumn.ROWID_COLUMN
- JSColumn.NONE
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number – int row identifier type.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetSQLName
Table Row (tr)
idname
Table Cell (td)
getSQLName
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getSQLName
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the name of the column as known by the database.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String – String sql name
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var sqlName = column.getSQLName()
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetScale
Table Row (tr)
idname
Table Cell (td)
getScale
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getScale
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the scale of the column as reported by the JDBC driver.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number – int column scale.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
var scale = column.getScale()
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetSequenceType
Table Row (tr)
idname
Table Cell (td)
getSequenceType
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getSequenceType
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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;
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number – int sequence type.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetTitle
Table Row (tr)
idname
Table Cell (td)
getTitle
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getTitle
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Get the title property of the column.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
String – String column title.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
var title = column.getTitle()
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetType
Table Row (tr)
idname
Table Cell (td)
getType
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Number
Span
stylefont-weight: bold;
getType
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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
Div
classsIndent
Number – int sql type.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idgetTypeAsString
Table Row (tr)
idname
Table Cell (td)
getTypeAsString
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getTypeAsString
Span
()
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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
Div
classsIndent
String – String sql name.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var typeName = column.getTypeAsString()
Table Row (tr)
classlastDetailRow
Table Cell (td) Table Body (tbody)
idhasFlag-Number
Table Row (tr)
idname
Table Cell (td)
hasFlag
Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
Boolean
Span
stylefont-weight: bold;
hasFlag
Span
(flag)
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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
Table Row (tr)
idprs
Table Cell (td)
Parameters
Div
classsIndent
{Number} flag
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Boolean – boolean whether flag is set.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
if (column.hasFlag(JSColumn.UUID_COLUMN))
{
	// handle uuid column
}
Table Row (tr)
classlastDetailRow
tdSmartClient,WebClient,NGClientsam

Sample

Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idDATABASE_SEQUENCE
Table Row (tr)
idname
Table Cell (td)
DATABASE_SEQUENCE
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the sequence type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idDATETIME
Table Row (tr)
idname
Table Cell (td)
DATETIME
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idEXCLUDED_COLUMN
Table Row (tr)
idname
Table Cell (td)
EXCLUDED_COLUMN
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the flags of columns.
This flag identifies columns that are skipped in the sql.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
if (column.hasFlag(JSColumn.UUID_COLUMN))
{
	// handle uuid column
}

...

classlastDetailRow

...

idINTEGER
Table Row (tr)
idname
Table Cell (td)
INTEGER
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idMEDIA
Table Row (tr)
idname
Table Cell (td)
MEDIA
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idNONE
Table Row (tr)
idname
Table Cell (td)
NONE
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant for column information indicating unset values.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idNUMBER
Table Row (tr)
idname
Table Cell (td)
NUMBER
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
Constant used when setting or getting the type of columns.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idPK_COLUMN
Table Row (tr)
idname
Table Cell (td)
PK_COLUMN
Table Row (tr)
iddes
Table Cell (td)
Div
classsIndent
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.
Table Row (tr)
idret
Table Cell (td)
Returns
Div
classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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;
}

...

classlastDetailRow

...

idROWID_COLUMN
sIdentjavascriptlastDetailRowDATABASE_SEQUENCEname

DATABASE_SEQUENCE

dessIndent
Constant used when setting or getting the sequence type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
DATETIMEname

DATETIME

dessIndent
Constant used when setting or getting the type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
EXCLUDED_COLUMNname

EXCLUDED_COLUMN

dessIndent
Constant used when setting or getting the flags of columns.
This flag identifies columns that are skipped in the sql.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
INTEGERname

INTEGER

dessIndent
Constant used when setting or getting the type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
MEDIAname

MEDIA

dessIndent
Constant used when setting or getting the type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
NATIVE_COLUMNname

NATIVE_COLUMN

dessIndent
Constant used when setting or getting the flags of columns.
This flag identifies columns that are marked as a native type column (for example uniqueidentifier).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
NONEname

NONE

dessIndent
Constant for column information indicating unset values.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
NUMBERname

NUMBER

dessIndent
Constant used when setting or getting the type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
PK_COLUMNname

PK_COLUMN

dessIndent
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.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
ROWID_COLUMNname

ROWID_COLUMN

dessIndent
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).
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
SERVOY_SEQUENCEname

SERVOY_SEQUENCE

dessIndent
Constant used when setting or getting the sequence type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
TENANT_COLUMNname

TENANT_COLUMN

dessIndent
Constant used when setting or getting the flags of columns.
This flag identifies columns that are marked as a tenant column.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
TEXTname

TEXT

dessIndent
Constant used when setting or getting the type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
UUID_COLUMNname

UUID_COLUMN

dessIndent
Constant used when setting or getting the flags of columns.
This flag identifies columns whose values are treated as UUID.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
UUID_GENERATORname

UUID_GENERATOR

dessIndent
Constant used when setting or getting the sequence type of columns.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods DetailsgetAllowNullname

getAllowNull()

dessIndent
Get the allow-null flag of the column.
ret

Returns

sIndent boolean allow-null flag.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRowgetDataProviderIDname

getDataProviderID()

dessIndent
Get the data provider id for this column (which is the same as name if not explicitly defined otherwise).
ret

Returns

sIndent String dataprovider id.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDefaultFormatname

getDefaultFormat()

dessIndent
Get the default format of the column.
ret

Returns

sIndent String column default format.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getDescriptionname

getDescription()

dessIndent
Get the description property of the column.
ret

Returns

sIndent String column description.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getForeignTypename

getForeignType()

dessIndent
Get the foreign type of the column.
The foreign type can be defined design time as a foreign key reference to another table.
ret

Returns

sIndent String foreign type.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getLengthname

getLength()

dessIndent
Get the length of the column as reported by the JDBC driver.
ret

Returns

sIndent int column length.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getNamename

getName()

dessIndent
Get the name of the column as used by Servoy.
ret

Returns

sIndent String column name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getQualifiedNamename

getQualifiedName()

dessIndent
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.
ret

Returns

sIndent String qualified column name.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getQuotedSQLNamename

getQuotedSQLName()

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

Returns

sIndent column name, quoted if needed.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getRowIdentifierTypename

getRowIdentifierType()

dessIndent
Get the row identifier type of the column.
The sequence type is one of:
 - JSColumn.PK_COLUMN
 - JSColumn.ROWID_COLUMN
 - JSColumn.NONE
ret

Returns

sIndent int row identifier type.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSQLNamename

getSQLName()

dessIndent
Get the name of the column as known by the database.
ret

Returns

sIndent String sql name
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSQLTypename

getSQLType()

dessIndent
Get the raw JDBC type of the column, which allows to check database specific types, like sting/byte column type variations.
ret

Returns

sIndent int sql type.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getScalename

getScale()

dessIndent
Get the scale of the column as reported by the JDBC driver.
ret

Returns

sIndent int column scale.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getSequenceTypename

getSequenceType()

dessIndent
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;
ret

Returns

sIndent int sequence type.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTablename

getTable()

dessIndent
Get the JSTable of this column.
ret

Returns

sIndent table The JSTable of this column.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTitlename

getTitle()

dessIndent
Get the title property of the column. If title is null will return column name.
ret

Returns

sIndent String column title.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTypename

getType()

dessIndent
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
ret

Returns

sIndent int sql type.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
getTypeAsStringname

getTypeAsString()

dessIndent
Get the name JDBC type of the column.
The same mapping as defined in JSColumn.getType() is applied.
ret

Returns

sIndent String sql name.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow
hasFlagname

hasFlag(flag)

dessIndent
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
 - JSColumn.TENANT_COLUMN
 - JSColumn.NATIVE_COLUMN
prs

Parameters

sIndentflag ;
ret

Returns

sIndent boolean whether flag is set.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow