Database :: extensionDefinition - Get extension property definition
The function returns the extension property definition for the property requested. When no property definition exists, the function throws an exception.
The property definition provides meta-information about the property.
Implementation overview
- Retrieve extension property by name
Database :: extensionDefinition ( sPropertyName ) - Get extension property definition by position
Database :: extensionDefinition ( iPosition )
Implementation details
-
Retrieve extension property by name
const odaba::PropertyDefinition Database  :: extensionDefinition ( odaba::String &sPropertyName )
The function tries to locate the extension property with the name passed in sPropertyName . When the requested property extension is neither defined in the database nor in the dictionary, the function throws an exception.
- sPropertyName
- Property name
The property name may contain a property path that consists of a sequence of property names. Not allowed are operation paths or path properties, i.e. the property name must consist of identifiers separated by dots (.), only.
In order to pass no property name, an empty string ( String() ) has to be passed.
to list
- sPropertyName
- Property name
-
Get extension property definition by position
const odaba::PropertyDefinition Database  :: extensionDefinition ( int32 iPosition )
The function returns the extension property at position passed in iPosition . Extension property definitions are provided in alphabetical order.
Trying to provide property definition with an invalid position value will result in an exception. In order to avoid requesting extension properties at invalid position, extensionsCount() might be called.
... fragment ( Database &db ) {
int count = db.extensionsCount();
for ( int indx0 = 0; indx0 < count; indx0++ )
printf("%s\n"),db.extensionDefinition(indx0).name());
}
- iPosition
- Position in collection
The position of an element in a collection is beginning with 0 for the first element.
to list
- iPosition
- Position in collection