Switch to: V9V8V7V6V5

KEYVALUE GET

Syntax

KEYVALUE keyvalue_name GET [LIKE] ( vext_key_list )
 
vext_key_list
    :    vext_key, ...
 
vext_key
    :    character_string_literal
    |    variable_name
    |    dynamic_parameter_specification

Description

This command is analog of SELECT command for tables. You can use it to get back values of the specified keys.

You will get a standard Valentina Cursor with 2 columns Key/Value and N records.

You can specify one or few keys. The cursor will contain rows with found keys and their values.

LIKE

LIKE allows you to execute START WITH search for KeyValues WITH KEY, i.e. with KeyValues which have a complex structure of key and which is known to Valentina Database.

You should specify the key pattern for keys which you want to find. See example below.

Note, that KeyValue FOR TABLE and FOR LINK, also are KeyValues WITH KEY, so LIKE search can be used as well.

Example:

-- Let we have empty KeyValue
 
-- Add some records:
KEYVALUE kvProperties INSERT ( '545.name', 'Bob' )
KEYVALUE kvProperties INSERT ( '545.age' , 29 )
 
KEYVALUE kvProperties GET ( '545.name', '545.age' )
 
------------------
| 545.name | Bob |
| 545.age  | 29  |
------------------

Example:

-- Let we have empty KeyValue WITH KEY
 
-- Add some records:
KEYVALUE kvProperties INSERT ( '545.name', 'Bob' )
KEYVALUE kvProperties INSERT ( '545.age' , 29 )
 
KEYVALUE kvProperties GET LIKE ( '545' ) -- '545' key pattern means - any key which first subKey is equal to "545"
 
------------------
| 545.name | Bob |
| 545.age  | 29  |
------------------

See Also