12.2. Metadata classes

Metadata it is objects what describe other object and so objects needdes to control of ODB kernel.

Any metadata have obligatory attribute <ID>. This attribute use for access to keeping objects. <ID> created ODB kernel when object append to dictionary.

The metadata counts and names are limited and determine by ODB kernel. The dictionary have object only classes:

DEPOSIT EXTENT ATTR COUNTER INDEX CLASS TCOLUMN TVIEW REPORT PLUGINS USER GROUP

In the dictionary mast be at least one object of each metaclass.

12.2.1. DEPOSIT the description of metadata "depository"

Attributes:

Example: create DEPOSIT metadata

	oDict := coDictionary():new("MY001")
	oDict:open()
	....
	depBody := map()
	depBody:name := "depository for Russian global information"
	...
	dep_id := oDict:append(depBody,"DEPOSIT")
	if !empty(oDict:error)
	   ? "Error:",oDict:error
	endif
	

12.2.2. EXTENT the description of metadata "extent"

Attributes:

Example: create EXTENT metadata

		extBody := map()
		extBody:name := "statedep"
		extBody:help := "information from state department of statistic"
		...
		ext_id := oDict:append(extBody,"EXTENT")
		....
	

12.2.3. ATTR the attribute description of keeping object

Attributes:

The TYPE values:

The LENTYPE values:

Example: create ATTR metadata

	attr:=map()
	attr:name := "code"
	attr:type := "C"
	attr:len  := 7
	attr:lentype := 3
	....
	code_id := oDict:append(attr,"ATTR")
	....
	attr:=map()
	attr:name := "name"
	attr:type := "C"
	attr:len  := 20
	attr:lentype := 2
	....
	name_id := oDict:append(attr,"ATTR")
	

12.2.4. COUNTERthe counter description

Attributes:

12.2.5. INDEX the index description

Attributes:

Example: create INDEX metadata

	indBody := map()
	indBody:name := "code"
	indBody:expr := "code"
	ind1_id := oDict:append(indBody,"INDEX")
	....
	indBody := map()
	indBody:name := "name"
	indBody:expr := "name"
	ind2_id := oDict:append(indBody,"INDEX")
	....
	

12.2.6. CLASS the structure description

Attributes:

Example: create CLASS metadata

	classBody:=map()
	/* information about coding world currencies */
	classBody:name := "currency"
	/* from state department of statistic */
	classBody:extent_id := ext_id
	/* return via "USD:USA dollar" */
	classBody:expr_essence := "code+':'+name"
	/* two attributes "code" and "name" */
	classBody:attr_list := {code_id,name_id}
	/* two index "code" and "name" */
	classBody:idx_list := {ind1_id,ind2_id}

	currency_id := oDict:append(classBody,"CLASS")
	if !empty(oDict:error)
	   ? "Error:",oDict:error
	endif
	 

12.2.7. TCOLUMNthe table column description

Attributes:

12.2.8. TVIEWthe table view description

Attributes:

12.2.9. REPORTthe report description

Attributes:

12.2.10. PLUGINSthe plugins modules description

Attributes:

12.2.11. USERthe user description

Attributes:

12.2.12. GROUPthe description of users group

Attributes: