company logo

Key :: Key - Constructor

The key constructor provides several conversion functions in order to convert different string formats into key values. When creating a key by passing a string value, the string type is determined from the string value.

Implementation overview

Implementation details

  1. Create copy for key
    Key  :: Key ( odaba::Key &cKey )

    The function duplicates the string value and the type definition from the typed string passed in cKey. When the type definition is valid, the string will be converted into an internal key.

    • cKey - Key value

      A key value is the key definition and a value for the key. The key value is typically provided in ESDF format. Other formats might be set (OIF, XML)

  2. to list
  3. Create empty key
    Key  :: Key (  )
  4. to list
  5. - internal feature (not documented)
    Key  :: Key ( odaba::TypeDefinition &cKeyDefinition )
    • cKeyDefinition - Key definition

      A key definition is a type definition for a key defined as projection of a complex data type.

  6. to list
  7. Create key from definition and string (key value)
    Key  :: Key ( odaba::TypeDefinition &cKeyDefinition, odaba::String &cString )
    • cKeyDefinition - Key definition

      A key definition is a type definition for a key defined as projection of a complex data type.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

  8. to list
  9. Create key from string
    Key  :: Key ( odaba::String &cString )

    The function creates a key from the string passed in cString. The string is copied to the key. The string type is determined for the string value. When the string does not correspond to any type, the function throws an exception.

    The string value is not validated when creating the type string, but will be validated later on, when applying to a complex data type.

    • cString - Constant string object

      When iPosition exceeds the string length or when the string is empty, the the function returns -1 (lower).

  10. to list