Loading...
 

CX_INDEX_DESCRIPTOR

CX_INDEX_DESCRIPTOR

Class hierarchy
Description:

This class represents an entry in the Index Manager and describes a database index. CX_INDEX_DESCRIPTOR objects cannot be created with CreateTransObject or CreatePersObject; they are created when indices are created via the Index Manager.

This class represents an abstraction of the actual database indices. If an index descriptor is activated, the database index is created. Deactivation leads to the deletion of the corresponding database index. The connection between database index and the corresponding CX_INDEX_DESCRIPTOR object can be lost under certain circumstances (e.g. by physically deleting a CX_INDEX_DESCRIPTOR from the database bypassing ClassiX or by using database tools to change indices). In this case, a CX_INDEX_DESCRIPTOR object corresponding to the index can be created via the Index Manager (if it does not already exist) and these can be synchronised again with the physical index using the UpdateStatus or UpdateFlags functions.

A CX_INDEX_DESCRIPTOR object is read-only. The UpdateREPIndex function can be used to modify it.

The index descriptors are not only information objects (about the database indexes), but they are also used to explicitly update a database index with the retrieve feature.

Code example:

Var(x)
CreatePersObject(CX_TEST_OBJECT_REP) -> x
"bla" x Put(testString)

CX_TEST_OBJECT_REP 0 "testString" ORDERED COPY_KEY | GetManager(INDEX) Call(AddREPIndex)

// Auf dem Stack: ein CX_INDEX_DESCRIPTOR-Objekt

List of methods (MDI)
Function MA* Parameters Return Brief description
ActivateIndex INTEGER - Activate index
AllQuery STRING Auxiliary functions for testing a database index for completeness
ExistenceQuery STRING
BreakLink
MakeLink
OBJECT
OBJECT
Update index (see also: Indices and Retrieve)
ClassName STRING Class name for REP-Collection
DeactivateIndex INTEGER - Deactivate index
DisplayOptions STRING Returned value: options as string (constant names)
GetCollection COLLECTION provides the indexed collection
GetIdxDomain INTEGER Returns the domain of the index (only for REP collections)
GetIdxLayer INTEGER Returns the layer of the index (only for REP collections)
GetName STRING Index in readable form
GetOptions INTEGER Returns: Options as integer value (constant values)
GetOsExpression STRING Index path in ObjectStore-compatible form
GetOwner OBJECT Embedded Collections: embedded in which object?
GetPathExpression STRING Index path
IsActive INTEGER Index activated?
IsDeep INTEGER Made with IndexCopy(DEEP)?
IsConsistent INTEGER Is the index consistent?
IsREPIndex INTEGER Index via a REP Collection?
SetSystemLayerAndDomain - Set system layer and domain by index
UpdateFlags updates the saved index options with those of the ObjectStore index (index must be activated).
UpdateStatus updates the saved status (active/inactive) with the corresponding ObjectStore index. If active, the flags are also updated.
GetDomain INTEGERDomain of this object
GetSiblings COLLECTION All siblings of this object
GetSiblings2 COLLECTION All siblings of this object
GetSlotEntries VECTORReturns a list with all slots of this object
Link OBJECT Adds itself to the list of objects with validity from the object passed as a parameter.
SetDomain INTEGER, INTEGER Set domain
Siblings *
Unlink Removes itself from the list of objects with validity
Unlink2 Remove this object from the list of objects with validity
VerifySiblings INTEGERCheck ring of exchange objects

* MA = Member Access Function

Data directory (DDI)
Data field Type Reference class I* Brief description
creation CX_DATETIME Creation date of the ObjectStore-Index (not of this object!)

* I = Indexable data field

Use in AppsWH
Module Brief description