company logo

PropertyHandle :: ProvideGlobal - Provide instance outside the transaction

The function works the same way as the Provide() function, except that global instances are created outside the transaction when not yet existing. When not running in a transactions the function works the same way as Add().

Creating global instances in a transaction prevents all other users from creating global instances for the same extent until the transaction is closed, since the index for the global collection is locked until terminating the transaction. Especially when creating instances via local collections that are based on global collections (extents) uncomfortable locks may block the system. In this case ProvideGlobal() should be used instead of Provide().

Using ProvideGlobal() for creating a new instance the instance will resist in the global collection also when rolling back the transaction.

Return value:  Instance area ( ::Instance  )

Instances do have the type of the referenced property handle (collection type). The instance contains a pointer to a properly structured instance area.

You can use the !-operator or the GetData() function to check whether the instance refers to data or not.

Implementation overview

Implementation details

  1. - internal feature (not documented)
    ::Instance PropertyHandle  :: ProvideGlobal ( PropertyHandle &cprop_hdl )
    • cprop_hdl - Property Handle
  2. to list
  3. - internal feature (not documented)
    ::Instance PropertyHandle  :: ProvideGlobal ( int32 set_pos0_w=AUTO )
    • set_pos0_w - Position in collection

      The position of an instance in a collection depends on the selected index. if the collection is unsorted the position is the only way for accessing the instance.

      For sorted collections the position is determined according to the instance key. If is a contradiction between position and key value the position will be ignored.

      Special positions are

      CUR_INSTANCE (-1) refers to the currently selected instance. If no instance is selected it refers to the first instance.

      FIRST_INSTANCE (0) refers to the first instance in a collection according to the selected index (sort order).

      FIRST_INSTANCE (0x7fffffff) refers to the last instance in a collection according to the selected index (sort order).

      Default: AUTO
  4. to list
  5. - internal feature (not documented)
    ::Instance PropertyHandle  :: ProvideGlobal ( ::Key sort_key )
    • sort_key - - internal feature (not documented)
  6. to list