company logo

TypeDefinition :: inherits - Does type inherit from passed type

The function returns whether the current type is identical or a specialization of the type name passed in sTypeName (true) or not (false). In contrast to basedOn(), the function also returns true, when the type is identical with the type name passed to the function. The function does not check, whether the type name passed is a valid type.

When calling the function with an invalid type definition or when the type definition does not refer to a complex data type, the function throws an exception.

Notes:

Since the function considers synonyms, several elementary types inherit, too (e.g. Date inherits DATE, bool inherits LOGICAL and reverse).

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool TypeDefinition  :: inherits ( odaba::String &sTypeName )
  • sTypeName - Type name

    The type name is the name of a data type (usually) defined in the database. The type name might be passed as simple identifier or as scoped name with preceding namespace names separated by double colon '::'.

    In order to pass no type name, an empty string ( String() ) may be passed.