Class CODBDICTIONARY

Name

CODBDICTIONARY  --  The essence this CODB class is storehouse of metadata - objects what keeping specifier other objects of classes: DEPOSIT,EXTENT,ATTR,COUNTER,INDEX,CLASS,TCOLUMN,TVIEW,REPORT,PLUGINS,USER,GROUP

Synopsis

 coDictionaryNew(<sDictID>, <sUser>, <sPasswd>) --> CODBDICTIONARY object
 coDictionary:New(<sDictID>, <sUser>, <sPasswd>)  --> CODBDICTIONARY object

Description

The essence this CODB class is storehouse of metadata - objects what keeping specifier other objects of classes: DEPOSIT,EXTENT,ATTR,COUNTER,INDEX,CLASS,TCOLUMN,TVIEW,REPORT,PLUGINS,USER,GROUP

Attributes

<ClassName> CODBDICTIONARY
<Error> String, the error description what araised within running last operation.

Methods

APPEND Append object to storehouse.
ATTRBODYBYNAME Returns object of metaclass ATTR.
CHECKBODY Checks object a valid metaclass.
CLASSBODYBYNAME Returns object of metaclass CLASS.
CLOSE Close opened files.
COUNTER Returns counter value.
CREATE Create empty dictionary.
DELETE Delete object from storehouse.
GETVALUE Get object from storehouse.
HASHNAME Returns properties name by hashcode.
IDLIST Returns object of class IDLIST.
NEW Initiation new CODBDICTIONARY object.
OPEN Open all necessary files.
PADRBODY Makes data representation.
SELECT Returns identifier list of selected objects.
UPDATE Update object into storehouse.

Method CODBDICTIONARY:APPEND()

 Append(<oData>, <sClassName>) 	--> <sDataID>

Append() appends new object <oData> to storehouse as object of class <sClassName> and returns objects identifier <sDataID>.

The structure description of added metadata see in section CODB metadata

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:ATTRBODYBYNAME()

 AttrBodyByName(<sObjClassName>) 	--> <oData>

AttrBodyByName() returns <oData> - object of class ATTR with name <sClassObjName>.

Method CODBDICTIONARY:CHECKBODY()

 CheckBody(<oData>, <sClassName>) 	--> <oData>

CheckBody() checks object <oData> a valid metaclass <sClassName>. If object is a valid, CheckBody() fills <oData> properties the default values if necessary.

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:CLASSBODYBYNAME()

 ClassBodyByName(<sObjClassName>) 	--> <oData>

ClassBodyByName() returns <oData> - object of class CLASS with name <sClassObjName>.

Method CODBDICTIONARY:CLOSE()

 Close() 	--> TRUE || FALSE

Close() is close files or connection with SQL server.

Method CODBDICTIONARY:COUNTER()

 Counter(<sCounterName>, <nDep>[, <nValue>]) 	--> <nCounter>

Counter() returns <nCounter> the current value for counter with name <sCounterName> into depository with number <nDep>.

If specified <nValue>, then counter <sCounterName> takes new value <nValue>.

Method CODBDICTIONARY:CREATE()

 Create() 	--> TRUE || FALSE

Create() returns TRUE if new empty ditionary created. Usualy, this method do not needy to direct invitation. It's call automaticaly when new dictionary appending into CODBLIST.

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:DELETE()

 Delete(<sDataID>) 	--> TRUE || FALSE

Delete() deletes object with identifier <sDataID> from dictionary.

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:GETVALUE()

 GetValue(<sDataID>) 	--> <oData>

GetValue() gets form dictionary and returns object <oData> with identifier <sDataID>.

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:HASHNAME()

 HashName(<nHashCode>) 	--> <sName>

HashName() returns <sName> properties name by hashcode <nHashCode> or empty string if unfortunately.

Method CODBDICTIONARY:IDLIST()

 IdList(<sClassName>[, <nOrder>][, <sName>][, <sWhere>]) 	--> <oIDList>

IdList() returns <oIDList> - object of class CODBIDLIST.

Method CODBDICTIONARY:NEW()

 New(<sDictID>, <sUser>, <sPasswd>) --> CODBDICTIONARY object

New() inits new CODBDICTIONARY object and returns it.

If object <sDictID> already exist, New() openes and returns this dictionary.

Method CODBDICTIONARY:OPEN()

 Open() 	--> TRUE || FALSE

Open() openes all necessary files or openes connection with SQL server.

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:PADRBODY()

 PadrBody(<oData>, <sClassName>) 	--> <oData>

PadrBody() makes data representation for <oData> to metaclass <sClassName>.

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:SELECT()

 Select(<sClassName>[, <nOrder>][, <sName>][, <sWhere>]) 	--> <aIdent>

Select() returns for class <sClassName> identifier list <aIdent> selected objects in order <nOrder> whose attribute <Name> == <sName> and attributes equal <sWhere>.

<::Error> contain error descriptions if araised.

Method CODBDICTIONARY:UPDATE()

 Update(<oData>) 	--> TRUE || FALSE

Update() updates object <oData> into storehouse. If dictinary have not object with identifier <oData:ID>, Update() returns FALSE.

The structure description of metadata see in section CODB metadata

<::Error> contain error descriptions if araised.

Example:

 /* create new object of class CODICTIONARY */
 oDict := coDictionary():new("MY001")
 oDict:open()
 ....
 
 /* create new object specifier */
 depBody := map()
 depBody:name := "depository for Russian global information"
 ...
 /* append object to dictionary */
 dep_id := oDict:append(depBody,"DEPOSIT")
 
 /* check error */
 if !empty(oDict:error)
 ? "Error:",oDict:error
 endif
 
 

See also

CODBLIST

Platforms

No dependies of platform.