Switch to: V12V11V10V9V8V7V6V5

GET/SET PROPERTY statement

These SQL commands allow to get/set value of both system and user-defined properties of such database objects as Engine, Database, Table, Field, Link, Server.

Syntax

get_property
    :	GET PROPERTY props_name_list OF DATABASE
    |	GET PROPERTY props_name_list OF TABLE table_name 
    |	GET PROPERTY props_name_list OF FIELD column_reference 
    |	GET PROPERTY props_name_list OF LINK link_name 
    |	GET PROPERTY props_name_list OF SERVER 
    |	GET PROPERTY props_name_list OF CONNECTION
    |	GET PROPERTY props_name_list 

set_property
    :	SET PROPERTY props_name_list OF DATABASE TO value_list
    |	SET PROPERTY props_name_list OF TABLE table_name TO value_list
    |	SET PROPERTY props_name_list OF FIELD column_reference TO value_list
    |	SET PROPERTY props_name_list OF LINK link_name TO value_list
    |	SET PROPERTY props_name_list OF SERVER TO value_list
    |	SET PROPERTY props_name_list OF CONNECTION TO value_list
    |	SET PROPERTY props_name_list TO value_list

props_name_list
    :    property_name, ...

values_list
    :    value_elem, ...

value_elem
    :    character_string_literal
    |    signed_numeric_literal
    |    TRUE
    |    FALSE
    |    NULL

Description

Let's note first of all that these SQL commands can be applied to objects of 3 types:

  • Valentina Engine - parameters of the engine are not stored at any place, so they are runtime only.
  • Database, Table, Link, Field - description of these objects are stored into system tables.
  • SERVER - parameters of Valentina Server are stored into ini-file.

Type of Properties

The value of a property is a STRING.

User-Defined Properties

Each schema object can have

  • system properties, which Valentina DB create itself
  • user-defined properties, which you can add to this or that object as you need.

To create a user-defined property in some object, just SET its value to something.

SET PROPERTY Color OF TABLE ZZ TO 'Red';
SET PROPERTY Color OF TABLE YY TO 'Green';

Notice that there is no way to delete a user-defined property.

Examples

SET PROPERTY IndexChanges OF TABLE actor TO TRUE;

See Also

Notes

Using SET/GET PROPERTY OF CONNECTION you may operate with any user-defined variable for the current connection.

See also: http://www.valentina-db.com/dokuwiki/doku.php?id=valentina:vcomponents:vsql:reference:compound_stmt:variables