odml2.dll

Classes:

Functions:

Index

Common index


Class KeyClient : PCom

#rus class KeyClient имеет статический объект Spec, содержащий
#rus вектор спецификаций наследников ODMLPersistSpec.
#module root.database.odml

Methods:


KeyClient::GetFreeIndex(object String)

#rus Конструктор клиента, устанавливает связь с сервером ключей

KeyClient::KeyClient(object String, object String, object String, object String, object String, object String)

#rus Конструктор клиента, устанавливает связь с сервером ключей

Class Meta

This class is designed for construction of code synthesizer on 
basis of the specification written in the META language.
#module root.system.parsers

Methods:


Meta::FuseCode(refer object TreeNode, refer any)

Code synthesis on basis of the specification and metalanguage tree.

Meta::Parse(refer object String)

param Template;

Returns specification tree on basis of the template specified via the 
Template parameter.

Meta::Parse(refer sfunc)

param Template;

Returns specification tree on basis of the template specified via the 
Template parameter.

Class ODMLQuery

This class translates an ODML query to an SQL query.
#module root.database.odml

Methods:


ODMLQuery::CreateParamsVector(refer object Vector, refer int)

param ImpliciteParams, Offset;

Forms a vector of parameters for passing to a query.
	ImpliciteParams - vector of direct parameters specified in the query as '?'.
	Offset          - offset, direct parameters are taken beginning from the offset.

ODMLQuery::GetParamTypes(void)

Returns the list of types of explicit parameters ('?' sign).

ODMLQuery::GetResultName(void)

Returns the variable name in order to place the result of the query of 
the following type:
	a = select ...
If the query did not have the target variable then EMPTY is 
returned.

ODMLQuery::GetSQLQuery(void)

Returns the SQL query derived from the ODML query.

ODMLQuery::GetSelectNames(void)

Returns list of names of selected items.

ODMLQuery::GetSelectTypes(void)

Returns list of types of selected items.

ODMLQuery::ODMLQuery(object String)

An ODML2 query is passed as a parameter to the constructor.

ODMLQuery::ODMLQuery(object String, refer object OdbcDs)

#rus В качестве параметра в конструктор передается ODML2 запрос и источник данных.

ODMLQuery::TraceQueryTree(void)

Prints the ODML query tree.

Class ObjectDifference3

The class contains the result of comparison of two object's modifications with
its duplicate made before modifications.
Dif1 - vector of names of the fields changed only in the first modification
of the object,
Dif2 - vector of names of the fields changed only in the second modification
of the object,
DifBoth - vector of names of the fields changed in both modifications
of the object.
If a modified field is vector then the mentioned fields will contain not
its name but an object of VectorFieldDif class.
#module root.database.odml

Methods:


ObjectDifference3::IsEmpty(void)

Returns TRUE, if the compared objects are equal, otherwise FALSE.

Class OdmlConnectInfo

#module root.database.odml

Methods:


Class OdmlModifyObjectInfo

#module root.database.odml

Methods:


Class Persist

The Persist class has the Spec static object which contains 
the vector of ODMLPersistSpec descendants' specifications.
#module root.database.odml

Methods:


Persist::AddUserDeleteTrigger(refer object String)

param MethodName

#rus Метод добавляет MethodName к списку имен триггеров удаления

Persist::AddUserLoadTrigger(refer object String)

param MethodName

#rus Метод добавляет MethodName к списку имен триггеров загрузки

Persist::AddUserPostSaveTrigger(refer object String)

param MethodName

#rus Метод добавляет MethodName к списку имен пост-триггеров сохранения

Persist::AddUserSaveTrigger(refer object String)

param MethodName

#rus Метод добавляет MethodName к списку имен триггеров сохранения

Persist::BuildAllMethods(void)

Method forces all classes which are listed in the ODML schema
to build real bodies of database methods.

Persist::CheckLockError(boolean)

param MsgBx;

Performs rollback together with erasing not-existent 
automatic primary keys.
If the MsgBx parameter == TRUE then raises request on operation 
repetition in case of a rollback that occurred because of the 
database lock.
Returns TRUE if an error occurs because of database lock by a 
competitive process; otherwise - FALSE.

Persist::CheckLockError(boolean, refer object GWnd)

param MsgBx, ParentWnd;

Performs rollback together with erasing not-existent 
automatic primary keys.
If the MsgBx parameter == TRUE then raises request on operation 
repetition in case of a rollback that occurred because of the 
database lock. The ParentWnd parameter is a parent window for a 
MessageBox.
Returns TRUE if an error occurs because of database lock by a 
competitive process; otherwise - FALSE.

Persist::CheckLockError(refer object GWnd)

param ParentWnd;

Performs rollback together with erasing not-existent 
automatic primary keys.
Raises request on operation repetition in case of a rollback that 
occurred because of the database lock.
The ParentWnd parameter is a parent window for a MessageBox.
Returns TRUE if an error occurs because of database lock by a 
competitive process; otherwise - FALSE.

Persist::CheckLockError(void)

param [ParentWnd];

Performs rollback together with erasing not-existent 
automatic primary keys.
Raises request on operation repetition in case of a rollback that 
occurred because of the database lock.
Returns TRUE if an error occurs because of database lock by a 
competitive process; otherwise - FALSE.

Persist::ChooseDataSource(int)

param DsIndex;

Choose DsIndex data source.
Returns index of the preceding data source.

Persist::Clear(void)

Deletes all objects from the dictionary on which there are no 
references.
This method returns the number of deleted objects.

Persist::ClearAll(void)

Deletes all objects from the dictionary on which there are no 
references including those referenced only by non-referenced
objects.
This method returns the number of deleted objects.

Persist::ClearTempPrimaryKey(void)

Performs erasing of automatic fields in case of the transaction 
rollback.

Persist::Commit(void)

Commits the transaction.

Persist::CreateAutoPrimKey(int, refer object String)

param ColumnType, KeyName;

This code is based on assumption, that there is a table
	PERSISTOPTION (PKEY, IDATA, ...)
and the next free integer primary key value is in the
column IDATA with the FREEINDEX key in the column PKEY.
---------------------------------
For particular system this method may be overwritten,
to another version of automatic primary key support.

Persist::CreateAutoPrimKey(refer object String, int, refer object String)

param FieldName, ColumnType, KeyName;

For particular system this method may be overwritten,
to another version of automatic primary key support.

Persist::CreateClassSpec(void)

Method creates/adjusts specification of classes, which
are listed in the ODML schema.

Persist::Exec(refer object ODMLQuery, refer object Vector)

param Query, Param;

Executes the query Query with the parameters Params.

Persist::Exec(refer object ODMLQuery, refer object Vector, refer int)

param ODMLQuery, Params, offset;

Executes the query Query with the parameters Params that are taken 
beginning from the offset.

Persist::Exec(refer object String)

param Query;

Executes the query Query.

Persist::Exec(refer object String, refer object Vector)

param Query, Param;

Executes the query Query with the parameters Params.

Persist::Exec(refer object String, refer object Vector, refer int)

param Query, Param, offset;

Executes the query Query with the parameters Params that are taken 
beginning from the offset.

Persist::Fetch(refer object ODMLQuery)

param Query;

Returns vector with next result data from the query Query 
or << >> if there are no more result data.

Persist::GetClassChildren(object String)

param ClassName;

Returns the list of descendants of the class ClassName by the database scheme.

Persist::GetClassID(object String)

param ClassName;

Determines an identifier name by the class name.

Persist::GetClassName(int)

param ClassID;

Determines a class name by the identifier.

Persist::GetClassName(object String, object String, any, refer ...)

param ClassName, FieldName, Value, [Stmt];

Determines a class name by the table record.

Persist::GetCurrentDS(void)

Return index of current DS.

Persist::GetDataSource(void)

Returns a reference to the current data source.

Persist::GetFreeIndex(int)

param IndexType;

IndexType - index type.
This method returns the next free index, the value of the 
free index in the PERSISTOPTION table whose name is equal to FREEINDEX 
is incremented by one.

Persist::GetFreeIndex(refer object String)

param Key;

Key - index name.
This method returns the next free index, the value of the 
free index in the PERSISTOPTION table whose name is equal to FREEINDEX 
is incremented by one.

Persist::GetModifyType(void)

Returns the synchronization algorithm's type if the object is marked as
modified, otherwise returns ODML_NO_MODIFIED.

Persist::GetNonLoadedIncludeList(void)

#rus Возвращает список незагруженных подсхем

Persist::GetNumbConnections(void)

Returns the number of data sources used by Persist.

Persist::GetOwnDataSource(void)

#rus Возврвщвет ссылку на источник данных, этого объекта.

Persist::GetVersion(void)

Returns ODML version.

Persist::HasInheritance(object String)

param ClassName;

Returns TRUE if there are successors of the class ClassName in the schema, 
otherwise - FALSE.

Persist::InitNew(void)

This method creates a primary key for the object with 
autoidentification if it is EMPTY.

Persist::IsConnectionLost(void)

#rus Проверяет наличие на обрыв связи и пытается переконектиться

Persist::IsDeadLock(void)

#rus Проверяет наличие deadlock

Persist::IsLockW(void)

Returns TRUE if the object is locked in the current transaction,
otherwise FALSE.

Persist::IsTransactionOpen(void)

Returns TRUE if there is an open transaction; otherwise FALSE.

Persist::LoadFile(refer object String)

param FileName;

Read class matching schema from FileName file.

Persist::LoadForUpdate(number)

param timeout;

Loads the object's fields from the database if the object exists in the
database and locks the object for writing.
Parameters:
	timeout - value of timeout for waiting of unlocking the object
		if the object is already locked by anybody else, seconds
		(-1 - unlimited waiting).
When the timeout is over an error is raised.

Persist::LoadIncludesFromDB(void)

#rus Загружает еще не загруженные подсхемы.

Persist::LoadSpec(refer object String)

param FileName;

Read class matching schema from file FileName.

Persist::LoadSpecFromDB(object Vector, ...)

param Filter;

Loads the scheme specification from the database.
Filter - vector that consists of four elements -
<< Scheme name, High number, Low number, Patch number >>.
The first element is String, others are integers.
Each element except the first one can be EMPTY and within the current field
the maximum value is selected.

Persist::LoadSpecFromDB(refer object GWnd)

param Parent;

Invokes a dialog with the list of specifications in the database.
Loads the scheme specification from a database according to the user's 
choice. 
Parent - a reference to the parent window for the scheme selection 
dialog.

Persist::LoadSpecFromDB(void)

Invokes a dialog with the list of specifications from the database.
Loads the scheme specification from the database according to the user's 
choice.

Persist::LoadSpecListFromDB(void)

Returns the list of specification names stored in the database.

Persist::LoadString(refer object String)

param ODMLSpec;

Read class matching schema from the ODMLSpec string.

Persist::LockW(number)

param timeout;

Locks the object for writing.
Parameters:
	timeout - value of timeout for waiting of unlocking the object
		if the object is already locked by anybody else, seconds
		(-1 - unlimited waiting).
When the timeout is over an error is raised.

Persist::Modify(int, ...)

Should be called before modifying of the object. Marks the object as modified.
The object will be automatically saved to the database when Commit method
is called.
If a deadlock occured when running Commit method Rollback method will be called.
If an error raised when saving the object OnErrorSave method will be called.
if the method returns 
	TRUE - the modification flag of the object will be cleared,
	FALSE - the object will remain marked as modified,
	EMPTY - the object will remain marked as modified and rollback
		will be performed.
If Rollback method is called then will be called the object's OnDeadlock
method (if a deadlock occured just before) or OnRollBack method (otherwise).
If the method called returns
	TRUE - the modification flag of the object will be cleared and
		the object will be reloaded,
	FALSE - the object will remain marked as modified,
		(if the synchronization algorithm's type was ODML_LOCK,
		the type will be changed to ODML_NO_LOCK),
	EMPTY - the modification flag of the object will be cleared.
Parameters:
	type - selects one of algorithms of synchronization with other clients using
the object. Can have one of the following values:
ODML_NO_LOCK, ODML_LOCK, ODML_OWV, ODML_OWS.
	time - (optional) time in seconds of waiting of the object's
unlocking. By default -1 (unlimited waiting). Note that the parameter is valid
only if type == ODML_LOCK.
Synchronization algorithms:
ODML_NO_LOCK: No synchronization will be used.
ODML_LOCK: When the method is called the object will be locked from other
	users' changes. Then the object will be reloaded from the database.
	If a transaction was not opened it will be. If the object was
	already locked by another client the method will wait the object's
	unlocking for time seconds. After timeout an error will be raised.
	
ODML_OWV: Synchronization will occure when Commit method is called.
	If the object was modified in the database by another client,
	the object's OnErrorOWV method will be called during Commit call.
	If OnErrorOWV will return
		TRUE - the object will not be saved, the modification flag
			will be cleared,
		FALSE - the object will not be saved, but will remain
			marked as modified,
		EMPTY - the object will not be saved, will remain
			marked as modified and "object was changed" error 
			will be raised.
ODML_OWS: Synchronization will occure when Commit method is called.
	If the object was modified in the database by another client,
	the object in the database and this object will be synchronized
	using Synchronize method and the synchronized object will be saved
	during Commit call. If synchronization fails (Synchronize method
	returns FALSE) then OnErrorOWS will be called.
	If OnErrorOWS will return
		TRUE - the object will not be saved, the modification flag
			will be cleared,
		FALSE - the object will not be saved, but will remain
			marked as modified,
		EMPTY - the object will not be saved, will remain
			marked as modified and "object was changed and 
			didn't synchronized" error will be raised.

Persist::Modify(void)

If a transaction is opened calls Modify( ODML_LOCK ),
otherwise calls Modify( ODML_OWV ).
See Modify( int, ... ).

Persist::MoveAllPointersTo(pointer object Persist)

Переносит все указатели в БД с объекта self на объект obj
Возвращает количество объектов, чьи указатели были перенесены.
Параметры:
1. obj.

Persist::New(void)

This method erases the identifier for the object with 
autoidentification or erases primary keys for the object
without autoidentification.

Persist::OnDeadlock(void)

See Modify( int, ... ).

Persist::OnDeleteTrigger(void)

Trigger on deleting an object from a database.
This method must be overwritten if it is supposed to 
perform some actions after deleting.
This method is called immediately after deleting.

Persist::OnErrorOWS(refer any, refer object Persist, refer any)

See Modify( int, ... ).

Persist::OnErrorOWV(void)

See Modify( int, ... ).

Persist::OnErrorSave(void)

See Modify( int, ... ).

Persist::OnLoadTrigger(void)

Trigger on loading an object from a database.
This method must be overwritten if it is supposed to 
perform some actions after loading.
This method is called immediately after loading.

Persist::OnRollBack(void)

See Modify( int, ... ).

Persist::OnSaveTrigger(void)

Trigger on saving an object to a database.
This method must be overwritten if it is supposed to 
perform some actions after saving.
This method is called immediately after saving.

Persist::OpenTransaction(int)

param Isolation;

Begins transaction that should be accomplished 
either by Commit or RollBack command. 
Isolation - transaction isolation level.
Valid values:
	SQL_TXN_SERIALIZABLE
	SQL_TXN_REPEATABLE_READ
	SQL_TXN_READ_COMMITTED
	SQL_TXN_READ_UNCOMMITTED

Persist::OpenTransaction(void)

Begins transaction that should be accomplished 
either by Commit or RollBack command. 
Transaction isolation level - SQL_TXN_SERIALIZABLE.

Persist::Prepare(refer object ODMLQuery, refer object Vector, ...)

param Query, Param[, FetchSize];

Prepares the query Query for the 
subsequent one-by-one data fetching by the Fetch method.
The FetchSize parameter determines the number of objects received 
by one Fetch operation. By default FetchSize is set to 100.
This method returns TRUE if succeeded; otherwise FALSE.

Persist::RCommit(void)

#rus Завершить успешно транзакцию. В случае deadlock
#rus совершается Persist::NumberOfTryCommit попыток успешно завершить транзакцию.

Persist::Register(void)

Adds the object to the dictionary. 
Returns a pointer to the object.

Persist::RemoveCurrentDS(void)

Return index of current DS.

Persist::RemoveFromDB(void)

#rus Помечает объект для удаления из БД.
#rus Во время первого вызова метода Commit(),
#rus этот объект будет удален.

Persist::RemoveUserDeleteTrigger(refer object String)

param MethodName

#rus Метод удаляет MethodName из списка имен триггеров удаления

Persist::RemoveUserLoadTrigger(refer object String)

param MethodName

#rus Метод удаляет MethodName из списка имен триггеров загрузки

Persist::RemoveUserPostSaveTrigger(refer object String)

param MethodName

#rus Метод удаляет MethodName из списка имен пост-триггеров сохранения

Persist::RemoveUserSaveTrigger(refer object String)

param MethodName

#rus Метод удаляет MethodName из списка имен триггеров сохранения

Persist::ResetDataSource(void)

Removes all the data sources.

Persist::RestoreDataSource(int, refer object OdbcDs)

#rus Восстанавливает связь с источником данных

Persist::RestoreDataSource(int, refer object OdbcDs, object String, object String, object String, object String, object String, object String)

#rus Восстанавливает связь с источником данных

Persist::RollBack(void)

Rollbacks the transaction to the previous stable state.

Persist::SetCurrentDS(int)

Return index of current DS.

Persist::SetDataSource(refer object OdbcDs)

param Ds;

Sets a data source. Returns its index.

Persist::SetDataSource(refer object OdbcDs, object String, object String, object String, object String, object String, object String)

param Ds, Address, Account, Password, DSN, dbAccount, dbPassword;

#rus Устанавливает источник данных Ds. Для получения oID используется
#rus KeyServer, доступ к которому определяется параметрами
Address, Account, Password.
#rus Возвращает его индекс.

Persist::Synchronize(refer object Persist, refer object Persist)

param mod2, sav;

Synchronizes two modifications of the object.
self is the first modification. The result will be placed in self.
Returns TRUE, if the synchronization succeded, otherwise FALSE.
Does not synchronize the object's fields modified in both modifications of
the object. If such fields exist and their contents differs, the method will
synchronize all the other fields and then will return FALSE.
Parameters:
	mod2 - the second modification of the object,
	sav  - the object's duplicate made before its modification.
See also ObjectDifference3, VectorFieldDif, VectorDif classes, 
Persist::Modify( int, ... ) method.

Persist::Synchronize(refer object Persist, refer object Persist, refer object ObjectDifference3)

param mod2, sav, res;

Synchronizes two modifications of the object.
self is the first modification. The result will be placed in self.
Returns TRUE, if the synchronization succeded, otherwise FALSE.
Does not synchronize the object's fields modified in both modifications of
the object. If such fields exist and their contents differs, the method will
synchronize all the other fields and then will return FALSE.
Parameters:
	mod2 - the second modification of the object,
	sav  - the object's duplicate made before its modification,
	res  - the result of comparison of two modifications with sav.
See also ObjectDifference3, VectorFieldDif, VectorDif classes, 
Persist::Modify( int, ... ) method.

Persist::ToDB(void)

Transmits the newly created object to the database cache.
During the first call of Commit(), the object will be saved to the database.
Returns a poiter to the object in the cache.

Persist::TotalReset(void)

#rus Поностью сбрасывает все структуры Persist

Persist::UpdateDictionary(void)

Updates dictionary objects from the database. Before that
all non-referenced objects are deleted.

Persist::UpdateSpecFromDB(void)

Updates the scheme from database with the maximum patch number.

Persist::_Commit(void)

Successfully commits transaction.

Persist::_RollBack(void)

Rollbacks transaction to the previous stable state.

Class VectorFieldDif : VectorDif

#module root.database.odml
The class contains results of comparison of two vectors stored in two
FieldName fields of two objects.
Add1 - indexes of items of the first vector that are absent in the second one.
Add2 - indexes of items of the second vector that are absent in the first one.
Common - vector of pairs of indexes of corresponding items of the vectors.
FieldName - compared field's name.

ODMLQuery_AddNameToVarDictionary

param Name;

Adds the new Name to the parameter dictionary.

ODMLQuery_AddToVarDictionary

param Name, Value;

Adds the new Name to a dictionary and assigns it the Value.

ODMLQuery_CheckDictionaryVar

param Flg;

The parameter can have TRUE or FALSE value.
Activates/deactivates parameter control from dictionary when 
parsing (translating) the query.

ODMLQuery_CheckInVarDictionary

param Name;

Checks a dictionary for the presence of the variable with the name Name. 
If the variable is found then TRUE is returned; otherwise - FALSE.

ODMLQuery_ClearVarDictionary

Clears the dictionary of parameter names.

ODMLQuery_FindInVarDictionary

param Name;

Returns a reference to the variable with the name Name from the dictionary.
If the name is not found then EMPTY is returned.

ODMLQuery_GetVariable

Returns an element from the dictionary.

ODMLQuery_UseVarDictionary

param Flg;

The parameter can have TRUE or FALSE value.
Activates/deactivates automatic substitution of parameters from the 
variables that contained in the VarDictionary.

Odml2Exec

param Query, Param;

Executes the query Query with the parameters Params.

Odml2ExecEx

param Query, Param, offset;

Executes the query Query with the parameters Params that are taken 
beginning from the offset.

Odml2ExecP

param Query, Param;

Executes the query Query with the parameters Params.
The objects obtained from the query are placed in the cache and are
substituted by its pointers. So there is single copy of a database
object in the memory.

Odml3Exec

param Query, Param;

#rus Объекты, полученные в результате запроса перемещаются
#rus в КЭШ и замещаются ссылками на них. Этим обеспечивается
#rus наличие одной копии объекта базы данных в памяти.

Odml_AllowPersistCopy

param AllowFlg;

If AllowFlg == TRUE copying of objects stored in the database is allowed,
otherwise an object's oID is cleared during copying.

Index: