dboo::odb::modify_index

void modify_index ( const cls_id& id, const field_name& fieldname, const option_set& options = index_options::default_field_index_options() );
template<class type>
void modify_index ( const field_name& fieldname, const option_set& options = index_options::default_field_index_options() );
template<typename MT, typename C>
void modify_index(MT C::* field, const option_set& options = index_options::default_field_index_options());
void modify_index ( const std::string& pattern, const option_set& options = index_options::default_field_index_options() );

Modifies an index’s configuration.

1

Modify based on class id and field namee

2

Selects named field in class as template parameter

3

Specify field index based on pointer to member

4

Use standard regex pattern to match all indices to modify.

Type Parameters

type

Class which holds the named field.

Parameters

id

Name of class

fieldname

Name of field. May be empty to select type index.

field

Pointer to member field

pattern

A regex to match which indices to affect

options

The following can be specified:

Option

Explanation

update_after_commit

Index will be updated after the call returns from commit

update_within_commit

Index will be updated before the call returns from commit

update_buffer_limit(bytes)

The size of the update buffer, in number of objects. Objects in the update buffer are included in search but not inserted in btree structure.

cache_size(blocks)

The size of the in-memory cache, in blocks

Return value

(none)

Exceptions

exception_index_not_found

If specified index is not found. Is not thrown if a regex has been specified and no index matches.

Example