ColumnType
Synopsis
enum ColumnType {
Undefined,
Builtin,
Text,
Number,
Boolean,
Image,
EClass
}
This enumeration type defines the type of user defined columns. It places certain restriction on the data that can be stored in fields of these columns.
Undefined
This type should never occur.
Builtin
Used for predefined columns that cannot be modified or deleted, have well defined column IDs, and are further identified by enumeration type BasketItemAttrId.
Text
Allows storage of arbitrary character sequences.
Number
Allows storage of character sequences that can be parsed as decimal floating point numbers. After removal of leading and trailing white space, values stored in columns of this type must be either empty strings or must match one of the following regular expressions (ignoring case):
[+-]?inf(inity)?
[+-]?nan
[+-]?[0-9]+(\.[0-9]*)?(e[+-]?[0-9]+)?
[+-]?\.[0-9]+(e[+-]?[0-9]+)?
If they match one of these regular expressions, they are converted to an IEEE 754-2008 Decimal64, the formatted as a string. The result of formatting matches one of the regular expressions listed above. Other than that, the result is implementation-defined.
Note that two numbers with identical values may end up with different string representations due to different quantum exponents or, if data is exchanged between different applications, due to different formatting rules.
Also note that P-BK and derived applications use Decimal128 Instead of Decimal64, and other applications may use still other internal representations. This is acceptable as long as they are prepared to deal with any character sequence matching one of the regular expressions listed above.
Boolean
Allows storage of either “0” or “1” (leading and trailing white space will be removed by operation setItemFields (§setItemFields)).
Image
Allows storage of an URI reference to an image. Once leading and trailing white space has been stripped, the remaining character sequence must be an empty string or parsable as an absolute URI with a scheme of either imp, gen, file or http. Furthermore, URIs with scheme imp or gen must be opaque (i.e. not hierarchical), whereas URIs with scheme file or http must be convertible to an URL.
No matter what URI scheme is used, there is no requirement that the identified resource actually exists. If it exists, it should be an image file, preferably JPEG or PNG.
Once an URI passed validation, it is converted to US-ASCII before stored in the field (RFC 2396 is limited to US-ASCII).
EClass (deprecated)
Had been used to store eCl@ss classifications