company logo

Property :: checkCollection - Check collection consistency

The function is typically called for persistent collection properties. The function allows checking and repairing consistency errors. Most consistency errors are caused by redundancy stored in the system but not maintained properly.

The function returns a string containing repair protocol messages. Errors are shown in the protocol string.

Notes:

The function call corresponds to checkCollection("-C:IXKG T:A -R").

Return value:  Result string ( odaba::String & )

The result string contains the result of an action or operation.

Implementation overview

Implementation details

  1. Calling collection check with default options
    odaba::String Property  :: checkCollection (  )

    A collection check for all instances and indexes, keys, inverse references and GUIDs will be performed. Damages will be reported but not repaired.

  2. to list
  3. Checking collection with specific check options
    odaba::String Property  :: checkCollection ( odaba::String &sCheckOptions )

    In order to perform specific collection checks, a check option string may be passed in sCheckOptions. In order to repair damages, -R has to be set in the option string.

    • sCheckOptions - Check options

      Check options can be passed as option string to CheckDB utility or Database ::checkDatabase() and Property ::checkCollection() check functions. An option string may contain following options:

          [-C:checks ] [-T:type ] [-R] [-W]

      All options are preceded by an option key, which allows defining options in any order. Default settings are assumed for options, which are not defined in an option string.

      Type of resources to be checked (-T:ICA)

      Test type allows reducing checks to indexes or instances:

          I - check instances, only

          C - check collections (indexes), only

          A - check collections and indexes

      Default: -T:A (running all checks)

      Check modes (-C:IXGK)

      The list of check options determines the type of checks to be performed:

          X - Index check

          I - Inverse reference check

          K - check key values

          G - GUID check

      Default: -C:IXG (running all checks)

      Repair option (-R)

      Only, when passing the repair option, inconsistencies will be repaired. Otherwise, consistencies are reported, only. Index entries referring to deleted instances are removed.

          u - In order to restore deleted instances, -R:u. is required.

      Warning option (-W)

      Show warnings. When this option is not set, warning are not shown.

      The order of the options does not play any role. One may use capital or small letters except for the option key -C, -T and -R

      Check modes (-C:IXG)

      The list of check options determines the type of checks to be performed:

          I    - Inverse reference check

          X    - Index check

          G    - GUID check

      Default: -C:IXG (running all checks)

      The order of the options does not play any role. One may use capital or smallletters except for the option key -C:

  4. to list