DATASET
The DATASET object is implemented as a key-value store that is a simple NoSQL in memory database. The data is stored in memory as a linked list of data items where each item requires a unique 'key'. The 'value' data for each item can be plain text, JSON, XML, binary data, HTML, etc... The DATASET object has properties and methods that allow a PL/B program to maintain and manage program data items as needed for the application. The declaration syntax of a DATASET is as follows:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Data Label.
%
Optional. Denotes the item as being GLOBAL.
arraysize
Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.
^
Optional. Denotes the item as being a POINTER.
target
Required. The name of a previously defined data item of the same type.
Flags Affected: NONE
Properties:
Properties are attributes of an object that define the object's characteristics or its behavior.
|
Get the current number of data items. | |
|
Filter string. | |
|
A type assigned to the items. | |
|
The maximum item count for the number of active items that can be added. | |
|
The text size to be used when an item is added with NULL input. | |
|
The identification number associated with an object. | |
|
The run-time name of the object. | |
|
Application specific data. |
Methods:
Methods are encapsulated routines that act upon an object.
|
Adds a data item. | |
|
Deletes and frees memory for all data items. | |
|
Finds and deletes a data item. | |
|
Finds a data item using a key or index | |
|
Finds a data item using a key or index and retrieves the associated data string. | |
|
Retrieves data items from a stack. | |
|
Places data items onto a stack. | |
|
Finds a data item using a key or index and updates the data for the data item. |
Note the following:
The DATASET is supported in CREATE, GETPROP, and SETPROP instructions.
If the DATASET object is not created when a method is executed, it is implicitly created by the method. When the DATASET object is implicitly created, all of the properties for the object are set to their default states.
See Also: Object Definitions, Object I/O Instructions, Method Syntax
![]() |