company logo

PropertyHandle :: CheckDB - Check data in object instance(s)

The function checks the data in the object instance or collection. Data is checked for the selected instance in case an instance is selected in the property handle. When no instance is selected, data is checked for all instances in the collection.

When check performed well (without errors), the function returns false (no error). In case of errors reported in the protocol string the function returns true (errors found). When severe errors caused the function to terminate, the function returns 2.

The result of the check process is returned in the string object passed to the function.

Return value:   - internal feature ( NString & )

Implementation details

NString PropertyHandle  :: CheckDB ( NString &noptions )

The function returns a string containing check protocol messages.

  • noptions - 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

    Show option (-S)

    Show check results. When this option is not set, results are not shown. For some operations, the option is set automatically.

    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