|
|
|
|
|
- Types of items
- Array items
Data model editor: the different types of items
The different types of items proposed in the data model editor are as follows:  | | Type | Used to store: |
---|
Text | alphanumeric characters- String: a character string containing up to 65.535 characters. This character string is in Ansi format.
- Text memo: a character string of 4 GB maximum. The RTF format is supported. This text memo is in Ansi format.
- Character: a single character (initialized by a binary 0, Charact(0)).
- Unicode: a character string in Unicode format.
- Unicode text memo: a character string of 4 GB maximum. This text memo is in Unicode format.
| Numeric | a numeric value- Signed 1-byte integer: value included between -128 and 127
- Signed 2-byte integer: value included between -32.768 and 32.767
- Signed 4-byte integer: value included between
-2.147.483.648 and 2.147.483.647 - Signed 8-byte integer: value included between -9.223.372.036.854.775.808 and 9.223.372.036.854.775.807
- Unsigned 1-byte integer: value included between 0 and 255
- Unsigned 2-byte integer: value included between 0 and 65.535
- Unsigned 4-byte integer: value included between 0 and 4.294.967.296
- Unsigned 8-byte integer: value included between 0 and 18.446.744.073.709.551.615
- 4-byte real: value included between -3,4e+38 and +3.4e+38
- 8-byte real: value included between -1,79e+308 and +1.79e+308
- Decimal (WLanguage numeric): a decimal can contain up to 38 significant digits.
| Currency | a currency A currency can contain up to 24 significant digits (up to 18 digits for the integer part and up to 6 digits for the decimal part) and it can take a value between -604 462 909 807 314 587,353 087 and +604 462 909 807 314 587,353 087. | Date | a date or a duration- Date (YYYYMMDD): a date in YYYYMMDD format (dates included between 01/01/0001 and 31/12/9999)
- Date and Time: a date-time (included between 01/01/0001 at 00:00 and 31/12/9999 at 23:59). The precision is up to the millisecond.
- Duration: a duration in milliseconds (included between
-9.223.372.036.854.775.808 and 9.223.372.036.854.775.807).
| Time | a time- Time (HH): Time included between 00H and 23H
- Time (HHMM): Time included between 00H00 and 23H59. The precision is up to the minute.
- Time (HHMMSS): Time included between 00H00min00ss and 23H59mn59ss. The precision is up to the second.
- Time (HHMMSSCC): Time included between 00H00min00ss00hs and 23H59mn59ss59hs. The precision is up to the tenth of a second.
Tip: To keep a time with a precision to the hundredth of a second, use the "Date and Time" type. | Boolean | a boolean (1: True and 0: False) | Sound, image, binary, ... | a binary file or string- Image (binary memo): an image file
- Sound (binary memo): a sound file
- OLE (binary memo): an OLE file
- Other binary memo: any type of file
- Binary string: a string in binary format
| Check Box | a value associated with a Check Box control- Check Box: a boolean (1: True and 0: False)
- Unsigned 1-byte integer: value included between 0 and 255
| Radio Button, List Box, Combo Box | a value associated with a Radio Button control, a List Box control or a Combo Box control. You have the ability to select the following sub-type: - 1-byte integer: a subscript corresponding to a list of values. The value of this subscript is included between -128 and 127
- 2-byte integer: a subscript corresponding to a list of values. The value of this subscript is included between -32.768 and 32.767
- 4-byte integer: a subscript corresponding to a list of values. The value of this subscript is included between
-2.147.483.648 and 2.147.483.647 - Unsigned 1-byte integer: a subscript corresponding to a list of values. The value of this subscript is included between 0 and 255
| Automatic ID | the identifier of each file record. Its value is automatically updated by the engine of the HFSQL database.- Automatic identifier (4 bytes): the identifier of each record (value included between 0 and 2.147.483.647)
This type corresponds to the "Identifier" type of WINDEV 5.5 - Automatic identifier (8 bytes): the identifier of each record (value included between 0 and 9.223.372.036.854.775.807)
- Automatic UUID (128 bits): the identifier of each record corresponds to a 128-bit UUID. In this case, the UUID is used to obtain a non-sequential unique identifier.
- Automatic UUID (256 bits): the identifier of each record corresponds to a 256-bit UUID. In this case, the UUID is used to obtain a non-sequential unique identifier.
Remark: The same record can have an automatic UUID and an automatic Identifier (for example, to simplify migration). | XML | an XML character string (4 GB maximum). This string is stored as a text memo. | Full-text index | the different elements of the full-text index. The full-text index can include text items or text memo items. | Enumeration, Combination | - Enumeration: an integer value among the possible values defined in the enumeration associated with the item.
- Combination: an integer value representing a combination of possible values defined in the combination associated with the item.
| Formula | a character string in SQL language representing a calculation formula. The formula can use SQL functions and/or WLanguage functions (WL.). Only the formula is stored, the value is calculated when accessing the record in read-only.For example, calculating the age from the DateOfBirth item of the file. The value will be calculated in the data file directly.
CAST(TO_CHAR(SYSDATE,'YYYY') AS int)-CAST(TO_CHAR(dateofbirth,'YYYY') AS int)
However, the calculated value can be stored in the file in order not to have to perform the calculation again. You have the ability to store the formula in Unicode: the calculation will be faster but a bigger space will be occupied by the formula. If the record is modified, the calculation formula is re-run in order to update the buffer of the data file with the new value. Caution: The NULL management complies with the SQL standard. For example, if an expression adds the NULL value to a value, the result corresponds to the NULL value. | Timestamp | a DateTime or a Date or a Time representing the creation date of the record or the date of the last modification performed on the record. You can select: - whether the creation date or the last modification date must be saved.
- whether the local time or the UTC time must be used.
This type of item is also called "Automatic DateTime item". | UUID | a UUID. A UUID (Universal Unique IDentifier) is a random number deemed unique. A UUID is useful to easily and reliably identify any element. You can select: - a 128-bit UUID. This type of UUID item complies with the 128-bit RFC 4122 standard. Only the 128-bit UUID is standardized.
- a 256-bit UUID.
To manage a UUID automatic identifier (automatically initialized by HFSQL), it is necessary to use an "Identifier" item whose sub-type is "Automatic UUID". Remark: The major interest of UUID is to allow anonymization and pseudonymization, useful for compliance with the GDPR standard. The UUID also allows you to manage cryptocurrency identifiers. | JSON | a JSON string. This type of item can contain NULL, an empty string or a valid JSON. JSON is automatically verified when the record is written. This type of item is used with JSON SQL functions in particular. | Remark: The Unicode items are managed by the wdxxxuni.dll library. This library is not available in WINDEV Mobile. Array items Some types of items can correspond to an array: the item content will be subscripted. To define an Array item: - Create an item. The following types of items can correspond to an array: Text, Numeric, Currency, Date, Time, Boolean, Check Box.
- In the item description:
- Check "Array" and specify the array dimension.
Caution: The array dimension is fixed. The corresponding space is reserved even if the item is not filled. - The actual item size is displayed.
- Specify (if necessary) the default values of each array element.
- Validate.
Remarks: - The first subscript starts from 1.
- The following syntax is used to handle array items: <File name>.<Item name>[<Subscript>]
- Caution: This type of item is kept for backward compatibility. Most of SQL databases do not support this type of items.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|