Child pages
  • JSColumnObject

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Constants Summary{th}{tr}{tbody}{tr}{td}[Number]{td}{td}[#DATABASE_IDENTITY]
Constant used when setting or getting the sequence type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#DATABASE_SEQUENCE]
Constant used when setting or getting the sequence type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#DATETIME]
Constant used when setting or getting the type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#EXCLUDED_COLUMN]
Constant used when setting or getting the flags of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#INTEGER]
Constant used when setting or getting the type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#MEDIA]
Constant used when setting or getting the type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#NONE]
Constant for column information indicating unset values.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#NUMBER]
Constant used when setting or getting the type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#PK_COLUMN]
Constant used when setting or getting the row identifier type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#ROWID_COLUMN]
Constant used when setting or getting the row identifier type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#SERVOY_SEQUENCE]
Constant used when setting or getting the sequence type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#TEXT]
Constant used when setting or getting the type of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#UUID_COLUMN]
Constant used when setting or getting the flags of columns.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#UUID_GENERATOR]
Constant used when setting or getting the sequence type of columns.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#allowNull]
Get or set the allow\-null flag of a new column.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#rowIdentifierType]
Get or set the row identifier type of the column.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#sequenceType]
Get or set the sequence type of the column.{td}{tr}{tbody}{table}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#getDataProviderID]\()
Get the data provider id for this column (which is the same as name if not explicitly defined otherwise).{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getDescription]\()
Get the description property of the column.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getForeignType]\()
Get the foreign type of the column.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getLength]\()
Get the length of the column as reported by the JDBC driver.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getQualifiedName]\()
Get the qualified name (including table name) of the column as known by the database.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getQuotedSQLName]\()
Returns a quoted version of the column name, if necessary, as defined by the actual database used.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getSQLName]\()
Get the name of the column as known by the database.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getScale]\()
Get the scale of the column as reported by the JDBC driver.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getTitle]\()
Get the title property of the column.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getType]\()
Get the JDBC type of the column.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#getTypeAsString]\()
Get the name JDBC type of the column.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#hasFlag]\(flag)
Check a flag of the column.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setDatabaseSequenceName]\()
Set the database sequence name of the column, used for columns with sequence type JSColumn.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setFlag]\(flag, set)
Set or clear a flag of a new column.{td}{tr}{tbody}{table}\\ 

{table:id=constant|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Constants Details{th}{tr}{tbody:id=DATABASE_IDENTITY|class=node}{tr:id=name}{td}h6.DATABASE_IDENTITY{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:DATABASE_IDENTITY_des|trigger=button|text=}{sub-section}{sub-section:DATABASE_IDENTITY_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the sequence type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:DATABASE_IDENTITY_snc|trigger=button|text=}{sub-section}{sub-section:DATABASE_IDENTITY_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DATABASE_IDENTITY_prs|trigger=button|text=}{sub-section}{sub-section:DATABASE_IDENTITY_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DATABASE_IDENTITY_ret|trigger=button|text=}{sub-section}{sub-section:DATABASE_IDENTITY_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DATABASE_IDENTITY_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATABASE_IDENTITY_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DATABASE_IDENTITY_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATABASE_IDENTITY_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DATABASE_IDENTITY_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATABASE_IDENTITY_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DATABASE_SEQUENCE|class=node}{tr:id=name}{td}h6.DATABASE_SEQUENCE{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:DATABASE_SEQUENCE_des|trigger=button|text=}{sub-section}{sub-section:DATABASE_SEQUENCE_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the sequence type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:DATABASE_SEQUENCE_snc|trigger=button|text=}{sub-section}{sub-section:DATABASE_SEQUENCE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DATABASE_SEQUENCE_prs|trigger=button|text=}{sub-section}{sub-section:DATABASE_SEQUENCE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DATABASE_SEQUENCE_ret|trigger=button|text=}{sub-section}{sub-section:DATABASE_SEQUENCE_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DATABASE_SEQUENCE_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATABASE_SEQUENCE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DATABASE_SEQUENCE_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATABASE_SEQUENCE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DATABASE_SEQUENCE_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATABASE_SEQUENCE_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DATETIME|class=node}{tr:id=name}{td}h6.DATETIME{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:DATETIME_des|trigger=button|text=}{sub-section}{sub-section:DATETIME_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:DATETIME_snc|trigger=button|text=}{sub-section}{sub-section:DATETIME_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DATETIME_prs|trigger=button|text=}{sub-section}{sub-section:DATETIME_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DATETIME_ret|trigger=button|text=}{sub-section}{sub-section:DATETIME_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DATETIME_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATETIME_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DATETIME_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATETIME_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DATETIME_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:DATETIME_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EXCLUDED_COLUMN|class=node}{tr:id=name}{td}h6.EXCLUDED_COLUMN{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:EXCLUDED_COLUMN_des|trigger=button|text=}{sub-section}{sub-section:EXCLUDED_COLUMN_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the flags of columns.
This flag identifies columns that are skipped in the sql.with description{sub-section}{td}{tr}{builder-show:permission=edit}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:EXCLUDED_COLUMN_snc|trigger=button|text=}{sub-section}{sub-section:EXCLUDED_COLUMN_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:EXCLUDED_COLUMN_prs|trigger=button|text=}{sub-section}{sub-section:EXCLUDED_COLUMN_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EXCLUDED_COLUMN_ret|trigger=button|text=}{sub-section}{sub-section:EXCLUDED_COLUMN_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EXCLUDED_COLUMN_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:EXCLUDED_COLUMN_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EXCLUDED_COLUMN_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:EXCLUDED_COLUMN_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EXCLUDED_COLUMN_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:EXCLUDED_COLUMN_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
if (column.hasFlag(JSColumn.UUID_COLUMN))
{
	// handle uuid column
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=INTEGER|class=node}{tr:id=name}{td}h6.INTEGER{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:INTEGER_des|trigger=button|text=}{sub-section}{sub-section:INTEGER_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:INTEGER_snc|trigger=button|text=}{sub-section}{sub-section:INTEGER_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:INTEGER_prs|trigger=button|text=}{sub-section}{sub-section:INTEGER_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:INTEGER_ret|trigger=button|text=}{sub-section}{sub-section:INTEGER_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:INTEGER_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:INTEGER_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:INTEGER_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:INTEGER_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:INTEGER_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:INTEGER_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=MEDIA|class=node}{tr:id=name}{td}h6.MEDIA{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:MEDIA_des|trigger=button|text=}{sub-section}{sub-section:MEDIA_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:MEDIA_snc|trigger=button|text=}{sub-section}{sub-section:MEDIA_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:MEDIA_prs|trigger=button|text=}{sub-section}{sub-section:MEDIA_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:MEDIA_ret|trigger=button|text=}{sub-section}{sub-section:MEDIA_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:MEDIA_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MEDIA_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:MEDIA_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MEDIA_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:MEDIA_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:MEDIA_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NONE|class=node}{tr:id=name}{td}h6.NONE{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:NONE_des|trigger=button|text=}{sub-section}{sub-section:NONE_des|trigger=none|class=sIndent}ConstantReplace for column information indicating unset values.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NONE_snc|trigger=button|text=}{sub-section}{sub-section:NONE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NONE_prs|trigger=button|text=}{sub-section}{sub-section:NONE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NONE_ret|trigger=button|text=}{sub-section}{sub-section:NONE_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NONE_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NONE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NONE_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NONE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NONE_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NONE_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=NUMBER|class=node}{tr:id=name}{td}h6.NUMBER{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:NUMBER_des|trigger=button|text=}{sub-section}{sub-section:NUMBER_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:NUMBER_snc|trigger=button|text=}{sub-section}{sub-section:NUMBER_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:NUMBER_prs|trigger=button|text=}{sub-section}{sub-section:NUMBER_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:NUMBER_ret|trigger=button|text=}{sub-section}{sub-section:NUMBER_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:NUMBER_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NUMBER_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:NUMBER_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NUMBER_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:NUMBER_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:NUMBER_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=PK_COLUMN|class=node}{tr:id=name}{td}h6.PK_COLUMN{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:PK_COLUMN_des|trigger=button|text=}{sub-section}{sub-section:PK_COLUMN_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the row identifier type of columns.
This value identifies columns that are defined as primary key in the database.{sub-with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:PK_COLUMN_snc|trigger=button|text=}{sub-section}{sub-section:PK_COLUMN_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:PK_COLUMN_prs|trigger=button|text=}{sub-section}{sub-section:PK_COLUMN_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:PK_COLUMN_ret|trigger=button|text=}{sub-section}{sub-section:PK_COLUMN_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:PK_COLUMN_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:PK_COLUMN_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:PK_COLUMN_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:PK_COLUMN_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:PK_COLUMN_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:PK_COLUMN_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ROWID_COLUMN|class=node}{tr:id=name}{td}h6.ROWID_COLUMN{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ROWID_COLUMN_des|trigger=button|text=}{sub-section}{sub-section:ROWID_COLUMN_des|trigger=none|class=sIndent}ConstantReplace 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).with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:ROWID_COLUMN_snc|trigger=button|text=}{sub-section}{sub-section:ROWID_COLUMN_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:ROWID_COLUMN_prs|trigger=button|text=}{sub-section}{sub-section:ROWID_COLUMN_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ROWID_COLUMN_ret|trigger=button|text=}{sub-section}{sub-section:ROWID_COLUMN_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ROWID_COLUMN_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ROWID_COLUMN_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ROWID_COLUMN_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ROWID_COLUMN_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ROWID_COLUMN_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ROWID_COLUMN_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=SERVOY_SEQUENCE|class=node}{tr:id=name}{td}h6.SERVOY_SEQUENCE{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:SERVOY_SEQUENCE_des|trigger=button|text=}{sub-section}{sub-section:SERVOY_SEQUENCE_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the sequence type of columns.with description{sub-section}{td}{tr}{builder-show:}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:SERVOY_SEQUENCE_snc|trigger=button|text=}{sub-section}{sub-section:SERVOY_SEQUENCE_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:SERVOY_SEQUENCE_prs|trigger=button|text=}{sub-section}{sub-section:SERVOY_SEQUENCE_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:SERVOY_SEQUENCE_ret|trigger=button|text=}{sub-section}{sub-section:SERVOY_SEQUENCE_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:SERVOY_SEQUENCE_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:SERVOY_SEQUENCE_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:SERVOY_SEQUENCE_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:SERVOY_SEQUENCE_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:SERVOY_SEQUENCE_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:SERVOY_SEQUENCE_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=TEXT|class=node}{tr:id=name}{td}h6.TEXT{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:TEXT_des|trigger=button|text=}{sub-section}{sub-section:TEXT_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:TEXT_snc|trigger=button|text=}{sub-section}{sub-section:TEXT_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:TEXT_prs|trigger=button|text=}{sub-section}{sub-section:TEXT_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:TEXT_ret|trigger=button|text=}{sub-section}{sub-section:TEXT_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:TEXT_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:TEXT_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:TEXT_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:TEXT_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:TEXT_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:TEXT_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=UUID_COLUMN|class=node}{tr:id=name}{td}h6.UUID_COLUMN{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:UUID_COLUMN_des|trigger=button|text=}{sub-section}{sub-section:UUID_COLUMN_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the flags of columns.
This flag identifies columns whose values are treated as UUID.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:UUID_COLUMN_snc|trigger=button|text=}{sub-section}{sub-section:UUID_COLUMN_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:UUID_COLUMN_prs|trigger=button|text=}{sub-section}{sub-section:UUID_COLUMN_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:UUID_COLUMN_ret|trigger=button|text=}{sub-section}{sub-section:UUID_COLUMN_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:UUID_COLUMN_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:UUID_COLUMN_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:UUID_COLUMN_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:UUID_COLUMN_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:UUID_COLUMN_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:UUID_COLUMN_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
if (column.hasFlag(JSColumn.UUID_COLUMN))
{
	// handle uuid column
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=UUID_GENERATOR|class=node}{tr:id=name}{td}h6.UUID_GENERATOR{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:UUID_GENERATOR_des|trigger=button|text=}{sub-section}{sub-section:UUID_GENERATOR_des|trigger=none|class=sIndent}ConstantReplace used when setting or getting the sequence type of columns.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:UUID_GENERATOR_snc|trigger=button|text=}{sub-section}{sub-section:UUID_GENERATOR_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:UUID_GENERATOR_prs|trigger=button|text=}{sub-section}{sub-section:UUID_GENERATOR_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:UUID_GENERATOR_ret|trigger=button|text=}{sub-section}{sub-section:UUID_GENERATOR_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:UUID_GENERATOR_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:UUID_GENERATOR_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:UUID_GENERATOR_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:UUID_GENERATOR_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:UUID_GENERATOR_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:UUID_GENERATOR_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=allowNull|class=node}{tr:id=name}{td}h6.allowNull{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:allowNull_des|trigger=button|text=}{sub-section}{sub-section:allowNull_des|trigger=none|class=sIndent}GetReplace or set the allow\-null flag of a new column.
Note that when a column is added to an existing table, allowNull will always be set.
For a primary key column, the allowNull flag will be always off, for other columns the flag is set by default.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:allowNull_snc|trigger=button|text=}{sub-section}{sub-section:allowNull_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:allowNull_prs|trigger=button|text=}{sub-section}{sub-section:allowNull_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:allowNull_ret|trigger=button|text=}{sub-section}{sub-section:allowNull_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:allowNull_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:allowNull_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:allowNull_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:allowNull_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:allowNull_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:allowNull_sam|trigger=none}{code:language=javascript}
var server = plugins.maintenance.getServer("example_data");
if (server)
{
	var table = server.createNewTable("users");
	if (table)
	{
		var pk = table.createNewColumn("id", JSColumn.MEDIA, 16); // can also use (JSColumn.TEXT, 36) for UUIDs
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.setFlag(JSColumn.UUID_COLUMN, true)
		pk.sequenceType = JSColumn.UUID_GENERATOR
		var c = table.createNewColumn("name", JSColumn.TEXT, 100);
		c.allowNull = false
		table.createNewColumn("age", JSColumn.INTEGER, 0);
		table.createNewColumn("last_login", JSColumn.DATETIME, 0);
		var result = server.synchronizeWithDB(table);
		if (result) application.output("Table successfully created.");
		else application.output("Table not created.");
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=rowIdentifierType|class=node}{tr:id=name}{td}h6.rowIdentifierType{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:rowIdentifierType_des|trigger=button|text=}{sub-section}{sub-section:rowIdentifierType_des|trigger=none|class=sIndent}Get or set the row identifier type of the column.
The sequence type is one of:
 \- JSColumn.PK\_COLUMN
 \- JSColumn.ROWID\_COLUMN
 \- JSColumn.NONEclass=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:rowIdentifierType_snc|trigger=button|text=}{sub-section}{sub-section:rowIdentifierType_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:rowIdentifierType_prs|trigger=button|text=}{sub-section}{sub-section:rowIdentifierType_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:rowIdentifierType_ret|trigger=button|text=}{sub-section}{sub-section:rowIdentifierType_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:rowIdentifierType_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rowIdentifierType_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:rowIdentifierType_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rowIdentifierType_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:rowIdentifierType_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:rowIdentifierType_sam|trigger=none}{code:language=javascript}
var server = plugins.maintenance.getServer("example_data");
if (server)
{
	// users has uuid pk
	var table = server.createNewTable("users");
	if (table)
	{
		var pk = table.createNewColumn("id", JSColumn.MEDIA, 16); // can also use <JSColumn.TEXT, 36> for UUIDs)
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.setFlag(JSColumn.UUID_COLUMN, true)
		pk.sequenceType = JSColumn.UUID_GENERATOR
		table.createNewColumn("name", JSColumn.TEXT, 100);
		var result = server.synchronizeWithDB(table);
		if (result) application.output("Table users successfully created.");
		else application.output("Table users not created.");
	}

	// groups has database sequence pk
	table = server.createNewTable("groups");
	if (table)
	{
		pk = table.createNewColumn("id", JSColumn.INTEGER, 0);
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.sequenceType = JSColumn.DATABASE_SEQUENCE
		pk.setDatabaseSequenceName('mygroupsequence')
		table.createNewColumn("name", JSColumn.TEXT, 100);
		result = server.synchronizeWithDB(table);
		if (result) application.output("Table groups successfully created.");
		else application.output("Table groups not created.");
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sequenceType|class=node}{tr:id=name}{td}h6.sequenceType{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:sequenceType_des|trigger=button|text=}{sub-section}{sub-section:sequenceType_des|trigger=none|class=sIndent}GetReplace or set 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;with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:sequenceType_snc|trigger=button|text=}{sub-section}{sub-section:sequenceType_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:sequenceType_prs|trigger=button|text=}{sub-section}{sub-section:sequenceType_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:sequenceType_ret|trigger=button|text=}{sub-section}{sub-section:sequenceType_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:sequenceType_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sequenceType_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:sequenceType_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sequenceType_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:sequenceType_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:sequenceType_sam|trigger=none}{code:language=javascript}
var server = plugins.maintenance.getServer("example_data");
if (server)
{
	// users has uuid pk
	var table = server.createNewTable("users");
	if (table)
	{
		var pk = table.createNewColumn("id", JSColumn.MEDIA, 16); // can also use <JSColumn.TEXT, 36> for UUIDs)
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.setFlag(JSColumn.UUID_COLUMN, true)
		pk.sequenceType = JSColumn.UUID_GENERATOR
		table.createNewColumn("name", JSColumn.TEXT, 100);
		var result = server.synchronizeWithDB(table);
		if (result) application.output("Table users successfully created.");
		else application.output("Table users not created.");
	}

	// groups has database sequence pk
	table = server.createNewTable("groups");
	if (table)
	{
		pk = table.createNewColumn("id", JSColumn.INTEGER, 0);
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.sequenceType = JSColumn.DATABASE_SEQUENCE
		pk.setDatabaseSequenceName('mygroupsequence')
		table.createNewColumn("name", JSColumn.TEXT, 100);
		result = server.synchronizeWithDB(table);
		if (result) application.output("Table groups successfully created.");
		else application.output("Table groups not created.");
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=getDataProviderID|class=node}{tr:id=name}{td}h6.getDataProviderID{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDataProviderID{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getDataProviderID_des|trigger=button|text=}{sub-section}{sub-section:getDataProviderID_des|trigger=none|class=sIndent}Get the data provider id for this column (which is the same as name if not explicitly defined otherwise).-section:getDataProviderID_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDataProviderID_snc|trigger=button|text=}{sub-section}{sub-section:getDataProviderID_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDataProviderID_prs|trigger=button|text=}{sub-section}{sub-section:getDataProviderID_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDataProviderID_ret|trigger=button|text=}{sub-section}{sub-section:getDataProviderID_ret|trigger=none|class=sIndent}[String] -- String dataprovider id.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDataProviderID_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataProviderID_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDataProviderID_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataProviderID_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDataProviderID_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDataProviderID_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var dataProviderId = column.getDataProviderID()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getDescription|class=node}{tr:id=name}{td}h6.getDescription{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getDescription{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getDescription_des|trigger=button|text=}{sub-section}{sub-section:getDescription_des|trigger=none|class=sIndent}GetReplace thewith description property of the column.{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getDescription_snc|trigger=button|text=}{sub-section}{sub-section:getDescription_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getDescription_prs|trigger=button|text=}{sub-section}{sub-section:getDescription_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getDescription_ret|trigger=button|text=}{sub-section}{sub-section:getDescription_ret|trigger=none|class=sIndent}[String] -- String column description.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getDescription_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDescription_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getDescription_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDescription_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getDescription_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getDescription_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
var desc = column.getDescription()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getForeignType|class=node}{tr:id=name}{td}h6.getForeignType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getForeignType{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getForeignType_des|trigger=button|text=}{sub-section}{sub-section:getForeignType_des|trigger=none|class=sIndent}GetReplace the foreign type of the column.
The foreign type can be defined design time as a foreign key reference to another table.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getForeignType_snc|trigger=button|text=}{sub-section}{sub-section:getForeignType_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getForeignType_prs|trigger=button|text=}{sub-section}{sub-section:getForeignType_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getForeignType_ret|trigger=button|text=}{sub-section}{sub-section:getForeignType_ret|trigger=none|class=sIndent}[String] -- String foreign type.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getForeignType_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getForeignType_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getForeignType_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getForeignType_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getForeignType_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getForeignType_sam|trigger=none}{code:language=javascript}
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)
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getLength|class=node}{tr:id=name}{td}h6.getLength{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getLength{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getLength_des|trigger=button|text=}{sub-section}{sub-section:getLength_des|trigger=none|class=sIndent}Get the length of the column as reported by the JDBC driver.Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getLength_snc|trigger=button|text=}{sub-section}{sub-section:getLength_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getLength_prs|trigger=button|text=}{sub-section}{sub-section:getLength_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getLength_ret|trigger=button|text=}{sub-section}{sub-section:getLength_ret|trigger=none|class=sIndent}[Number] -- int column length.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getLength_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getLength_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getLength_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getLength_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getLength_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getLength_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
if (column.getLength() < 10)
{
	 // handle short column
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getQualifiedName|class=node}{tr:id=name}{td}h6.getQualifiedName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getQualifiedName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getQualifiedName_des|trigger=button|text=}{sub-section}{sub-section:getQualifiedName_des|trigger=none|class=sIndent}GetReplace 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.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getQualifiedName_snc|trigger=button|text=}{sub-section}{sub-section:getQualifiedName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getQualifiedName_prs|trigger=button|text=}{sub-section}{sub-section:getQualifiedName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getQualifiedName_ret|trigger=button|text=}{sub-section}{sub-section:getQualifiedName_ret|trigger=none|class=sIndent}[String] -- String qualified column name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getQualifiedName_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getQualifiedName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getQualifiedName_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getQualifiedName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getQualifiedName_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getQualifiedName_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var qualifiedSqlName = column.getQualifiedName()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getQuotedSQLName|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getQuotedSQLName_des|trigger=button|text=}{sub-section}{sub-section:getQuotedSQLName_des|trigger=none|class=sIndent}ReturnsReplace a quoted version of the column name, if necessary, as defined by the actual database used.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getQuotedSQLName_snc|trigger=button|text=}{sub-section}{sub-section:getQuotedSQLName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getQuotedSQLName_prs|trigger=button|text=}{sub-section}{sub-section:getQuotedSQLName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getQuotedSQLName_ret|trigger=button|text=}{sub-section}{sub-section:getQuotedSQLName_ret|trigger=none|class=sIndent}[String] -- column name, quoted if needed.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getQuotedSQLName_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getQuotedSQLName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getQuotedSQLName_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getQuotedSQLName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getQuotedSQLName_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getQuotedSQLName_sam|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()
var jsColumn = jsTable.getColumn('active')
var quotedColumnName = jsColumn.getQuotedSQLName()
plugins.rawSQL.executeSQL('udm',  quotedTableName,  'select * from ' + quotedTableName + ' where ' + quotedColumnName + ' = ?', [1])
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getSQLName|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getSQLName_des|trigger=button|text=}{sub-section}{sub-section:getSQLName_des|trigger=none|class=sIndent}Get the name of the column as known by the database.Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getSQLName_snc|trigger=button|text=}{sub-section}{sub-section:getSQLName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getSQLName_prs|trigger=button|text=}{sub-section}{sub-section:getSQLName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getSQLName_ret|trigger=button|text=}{sub-section}{sub-section:getSQLName_ret|trigger=none|class=sIndent}[String] -- String sql name{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getSQLName_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSQLName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getSQLName_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSQLName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getSQLName_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getSQLName_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var sqlName = column.getSQLName()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getScale|class=node}{tr:id=name}{td}h6.getScale{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getScale{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getScale_des|trigger=button|text=}{sub-section}{sub-section:getScale_des|trigger=none|class=sIndent}GetReplace the scale of the column as reported by the JDBC driver.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getScale_snc|trigger=button|text=}{sub-section}{sub-section:getScale_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getScale_prs|trigger=button|text=}{sub-section}{sub-section:getScale_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getScale_ret|trigger=button|text=}{sub-section}{sub-section:getScale_ret|trigger=none|class=sIndent}[Number] -- int column scale.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getScale_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getScale_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getScale_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getScale_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getScale_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getScale_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
var scale = column.getScale()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTitle|class=node}{tr:id=name}{td}h6.getTitle{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getTitle{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getTitle_des|trigger=button|text=}{sub-section}{sub-section:getTitle_des|trigger=none|class=sIndent}GetReplace the title property of the column.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTitle_snc|trigger=button|text=}{sub-section}{sub-section:getTitle_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getTitle_prs|trigger=button|text=}{sub-section}{sub-section:getTitle_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getTitle_ret|trigger=button|text=}{sub-section}{sub-section:getTitle_ret|trigger=none|class=sIndent}[String] -- String column title.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTitle_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTitle_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTitle_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTitle_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTitle_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTitle_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customername')
var title = column.getTitle()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getType|class=node}{tr:id=name}{td}h6.getType{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getType{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getType_des|trigger=button|text=}{sub-section}{sub-section:getType_des|trigger=none|class=sIndent}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{sub-section}{sub-section:getType_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getType_snc|trigger=button|text=}{sub-section}{sub-section:getType_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getType_prs|trigger=button|text=}{sub-section}{sub-section:getType_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getType_ret|trigger=button|text=}{sub-section}{sub-section:getType_ret|trigger=none|class=sIndent}[Number] -- int sql type.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getType_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getType_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getType_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getType_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getType_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getType_sam|trigger=none}{code:language=javascript}
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;
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTypeAsString|class=node}{tr:id=name}{td}h6.getTypeAsString{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}getTypeAsString{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getTypeAsString_des|trigger=button|text=}{sub-section}{sub-section:getTypeAsString_des|trigger=none|class=sIndent}GetReplace the name JDBC type of the column.
The same mapping as defined in JSColumn.getType() is applied.with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTypeAsString_snc|trigger=button|text=}{sub-section}{sub-section:getTypeAsString_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getTypeAsString_prs|trigger=button|text=}{sub-section}{sub-section:getTypeAsString_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getTypeAsString_ret|trigger=button|text=}{sub-section}{sub-section:getTypeAsString_ret|trigger=none|class=sIndent}[String] -- String sql name.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTypeAsString_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTypeAsString_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTypeAsString_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTypeAsString_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTypeAsString_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTypeAsString_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
var typeName = column.getTypeAsString()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=hasFlag|class=node}{tr:id=name}{td}h6.hasFlag{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}hasFlag{span}{span:id=iets|style=float: left;}\(flag){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:hasFlag_des|trigger=button|text=}{sub-section}{sub-section:hasFlag_des|trigger=none|class=sIndent}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|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:hasFlag_snc|trigger=button|text=}{sub-section}{sub-section:hasFlag_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:hasFlag_prs|trigger=button|text=}{sub-section}{sub-section:hasFlag_prs|trigger=none|class=sIndent}\{[Number]} flag
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:hasFlag_ret|trigger=button|text=}{sub-section}{sub-section:hasFlag_ret|trigger=none|class=sIndent}[Boolean] -- boolean whether flag is set.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:hasFlag_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasFlag_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:hasFlag_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasFlag_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:hasFlag_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:hasFlag_sam|trigger=none}{code:language=javascript}
var table = databaseManager.getTable('db:/example_data/orders')
var column = table.getColumn('customerid')
if (column.hasFlag(JSColumn.UUID_COLUMN))
{
	// handle uuid column
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setDatabaseSequenceName|class=node}{tr:id=name}{td}h6.setDatabaseSequenceName{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setDatabaseSequenceName{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setDatabaseSequenceName_des|trigger=button|text=}{sub-section}{sub-section:setDatabaseSequenceName_des|trigger=none|class=sIndent}Set the database sequence name of the column, used for columns with sequence type JSColumn.DATABASE\_SEQUENCE.Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setDatabaseSequenceName_snc|trigger=button|text=}{sub-section}{sub-section:setDatabaseSequenceName_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:setDatabaseSequenceName_prs|trigger=button|text=}{sub-section}{sub-section:setDatabaseSequenceName_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:setDatabaseSequenceName_ret|trigger=button|text=}{sub-section}{sub-section:setDatabaseSequenceName_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setDatabaseSequenceName_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setDatabaseSequenceName_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setDatabaseSequenceName_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setDatabaseSequenceName_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setDatabaseSequenceName_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setDatabaseSequenceName_sam|trigger=none}{code:language=javascript}
var server = plugins.maintenance.getServer("example_data");
if (server)
{
	// users has uuid pk
	var table = server.createNewTable("users");
	if (table)
	{
		var pk = table.createNewColumn("id", JSColumn.MEDIA, 16); // can also use <JSColumn.TEXT, 36> for UUIDs)
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.setFlag(JSColumn.UUID_COLUMN, true)
		pk.sequenceType = JSColumn.UUID_GENERATOR
		table.createNewColumn("name", JSColumn.TEXT, 100);
		var result = server.synchronizeWithDB(table);
		if (result) application.output("Table users successfully created.");
		else application.output("Table users not created.");
	}

	// groups has database sequence pk
	table = server.createNewTable("groups");
	if (table)
	{
		pk = table.createNewColumn("id", JSColumn.INTEGER, 0);
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.sequenceType = JSColumn.DATABASE_SEQUENCE
		pk.setDatabaseSequenceName('mygroupsequence')
		table.createNewColumn("name", JSColumn.TEXT, 100);
		result = server.synchronizeWithDB(table);
		if (result) application.output("Table groups successfully created.");
		else application.output("Table groups not created.");
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setFlag|class=node}{tr:id=name}{td}h6.setFlag{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setFlag{span}{span:id=iets|style=float: left;}\(flag, set){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:setFlag_des|trigger=button|text=}{sub-section}{sub-section:setFlag_des|trigger=none|class=sIndent}SetReplace or clear a flag of a new column.
The flags are a bit pattern consisting of 1 or more of the following bits:
 \- JSColumn.UUID\_COLUMN;
 \- JSColumn.EXCLUDED\_COLUMN;with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setFlag_snc|trigger=button|text=}{sub-section}{sub-section:setFlag_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setFlag_prs|trigger=button|text=}{sub-section}{sub-section:setFlag_prs|trigger=none|class=sIndent}\{[Number]} flag -- the flag to set
\{[Boolean]} set -- true for set flag, false for clear flag
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setFlag_ret|trigger=button|text=}{sub-section}{sub-section:setFlag_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setFlag_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setFlag_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setFlag_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setFlag_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setFlag_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:setFlag_sam|trigger=none}{code:language=javascript}
var server = plugins.maintenance.getServer("example_data");
if (server)
{
	var table = server.createNewTable("users");
	if (table)
	{
		var pk = table.createNewColumn("id", JSColumn.MEDIA, 16); // can also use (JSColumn.TEXT, 36) for UUIDs
		pk.rowIdentifierType = JSColumn.PK_COLUMN;
		pk.setFlag(JSColumn.UUID_COLUMN, true)
		pk.sequenceType = JSColumn.UUID_GENERATOR
		var c = table.createNewColumn("name", JSColumn.TEXT, 100);
		c.allowNull = false
		table.createNewColumn("age", JSColumn.INTEGER, 0);
		table.createNewColumn("last_login", JSColumn.DATETIME, 0);
		var result = server.synchronizeWithDB(table);
		if (result) application.output("Table successfully created.");
		else application.output("Table not created.");
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}