...
Code Block |
---|
#PARSER PQL #RUNQUERY timer = TIMER({ period = 1000, source = 'timersource' } ) Map1 = MAP({EXPRESSIONS = ['time','kvwrite("test2","Time",time)','kvread("test2", "Time")']}, timer) |
For easier handling, there are also operators that allow to read different datatypes from store and avoid casting in MAP, as the default return value of the kvread method is Object:
- kvReadBool
- kvReadLong
- kvReadDouble
- kvReadString
Important: This read operations make no type conversion! So if you call kvReadBool and the value is a String, there could be Problems when using this value later.
You could also use an operator to write to an existing store:
...