Fields
Within a Table Spec definition, the Fields element contains field definitions that are converted into columns when loaded into the Infinity catalog. You specify information such as field name and data type, along with other optional attributes like default values and whether or not NULLs are allowed.
Infinity automatically creates some fields by default whenever you make a new table – it's important to note these when defining your tables so you don’t replicate functionality that’s built in
The following columns are created automatically:
Column Name |
Data Type |
Description |
---|---|---|
ID |
uniqueidentifier |
Primary key. Not NULL. |
ADDEDBYID |
uniqueidentifier |
The user that added the row. Not NULL. |
DATEADDED |
Datetime |
The date the row was added. Not NULL. |
CHANGEDBYID |
uniqueidentifier |
The user that last changed the row. Not NULL. |
DATECHANGED |
Datetime |
The date the row was last changed. Not NULL. |
TS |
Timestamp |
Used for concurrency checks when performing edits. |
Example: Automatically created columns
The following columns are added to the table when the CustomIdentifier attribute in TableSpec elements is set to True:
Column Name | Data Type | Description |
---|---|---|
CUSTOMIDENTIFIER | nvarchar(100) | User-definable custom identifier. CUSTOMIDENTIFIER is an nvarchar(100) field and is used to store a unique identifier specified by the user. If the user does not specify an identifier, then CUSTOMIDENTIFIER defaults to an empty string (''). |
SEQUENCEID | Integer | Identity column used to increment the default lookupid. SEQUENCEID is an integer field that contains a unique integer value for each record in the table and is set automatically. It is implemented as an Identity field in SQL Server with a seed value of 10,000,000 that increments by 1. |
LOOKUPID | Datetime | Unique identifier that supports user-defined values as well as system generated values. LOOKUPID is a computed field that returns either the value of CUSTOMIDENTIFIER if CUSTOMIDENTIFIER has been specified, or a system-generated unique ID based on SEQUENCEID. The LOOKUPID field value can always be considered unique. |
Example: Automatically created columns when CustomIdentifier TableSpec attribute is equal to True