CollectionSchema Class Documentation
class CollectionSchemaNamespace:datalogics_interface
Detailed Description
Provides for adding/removing/retrieving schema fields in a collection.
Referenced by
Uses types
Constructor & Destructor Documentation
CollectionSchema
CollectionSchema(CollectionSchema && )Parameters
~CollectionSchema
~CollectionSchema()Member Function Documentation
add_field
void add_field(CollectionSchemaField & field)Parameters
field: CollectionSchemaField &CollectionSchemaField object which will be added to the schema.
Returns:
voidAddField allows to set new field to the CollectionSchema object. If the target field exists, it is overwritten.
The schema fields contain all information required to organize Collection in a certain way.
get_field
std::unique_ptr< CollectionSchemaField > get_field(const std::string & name)Parameters
name: const std::string &textual field name.
Returns:
std::unique_ptr< CollectionSchemaField >CollectionSchemaField object if found or NULL otherwise.
GetField allows to obtain CollectionSchemaField by name.
get_field
std::unique_ptr< CollectionSchemaField > get_field(int index)Parameters
index: inttextual field name.
Returns:
std::unique_ptr< CollectionSchemaField >CollectionSchemaField object if found or NULL otherwise.
GetField allows to obtain CollectionSchemaField by name.
get_field_count
int get_field_count()Returns:
intthe fields number.
GetFieldsNumber allows to obtain fields number in the schema.
operator=
CollectionSchema & operator=(CollectionSchema && )Parameters
Returns:
CollectionSchema &remove_field
void remove_field(CollectionSchemaField & field)Parameters
field: CollectionSchemaField &CollectionSchemaField which will be removed from the schema.
Returns:
voidRemoveField allows to remove specified field from the schema.
NOTE: to distinguish whether specified object belongs to the schema this uses CollectionSchemaField's name.