CollectionSchema Class Documentation

classCollectionSchema

Namespace:datalogics_interface

Detailed Description

Provides for adding/removing/retrieving schema fields in a collection.

Referenced by

Constructor & Destructor Documentation

~CollectionSchema

~CollectionSchema()

Member Function Documentation

add_field

voidadd_field(CollectionSchemaField &field)

Parameters

field: CollectionSchemaField &

CollectionSchemaField object which will be added to the schema.

Returns:

void

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:

CollectionSchemaField object if found or NULL otherwise.

GetField allows to obtain CollectionSchemaField by name.

get_field

Parameters

index: int

textual field name.

Returns:

CollectionSchemaField object if found or NULL otherwise.

GetField allows to obtain CollectionSchemaField by name.

get_field_count

intget_field_count()

Returns:

the fields number.

GetFieldsNumber allows to obtain fields number in the schema.

remove_field

voidremove_field(CollectionSchemaField &field)

Parameters

field: CollectionSchemaField &

CollectionSchemaField which will be removed from the schema.

Returns:

void

NOTE: to distinguish whether specified object belongs to the schema this uses CollectionSchemaField's name.