WYRDTEK Home Features Reference Downloads About


Reference/es_mbb

struct es_mbb is an opaque data structure representing a field-binding collection. A program variable may be bound to a database field for the purposes of reading or updating a database. struct es_mbb is a collection of such bindings for some or all of the fields in a particular class.

Field bindings are used in conjunction with iterators (struct es_mbi) to populate, update or query a database.

There are two types of field-bindings:
Binding by value A program variable's value is copied to the database during an insert/update operation and a database field's value is copied to the program variable during a fetch operation.
Binding by reference The address of (or pointer to) a database field's value is copied to the program variable during either an update or fetch operation. This is convenient for incremental updates, such as computing an aggregate value.

The es_mbb interface contains functions to construct and destroy a field-binding as well as functions to bind database fields to program variables. A binding function exists for each combination of field type and binding type. A membership filter (struct es_mbm) may also be bound to a database field for use in filtered iterators ( see es_mbi_beginfetch() ).
Constructing/Destroying
es_mbb_new Create new field-binding for a particular class.
es_mbb_delete Delete a field-binding.
es_mbb_mbm Bind integer field to membership filter.
Binding by value
es_mbb_i8_v Bind a field of type ES_FLDTYPE_I8 by value.
es_mbb_i16_v Bind a field of type ES_FLDTYPE_I16 by value.
es_mbb_i32_v Bind a field of type ES_FLDTYPE_I32 by value.
es_mbb_i64_v Bind a field of type ES_FLDTYPE_I64 by value.
es_mbb_f64_v Bind a field of type ES_FLDTYPE_F64 by value.
es_mbb_mbn_v Bind a field of type ES_FLDTYPE_MBN by value. This includes both node reference and child node fields.
es_mbb_mbu_v Bind a field of type ES_FLDTYPE_MBU by value.
es_mbb_str_v Bind a field of type ES_FLDTYPE_STR by value.
es_mbb_void_v Bind a field of any type by value.
Binding by reference
es_mbb_i8_r Bind a field of type ES_FLDTYPE_I8 by reference.
es_mbb_i16_r Bind a field of type ES_FLDTYPE_I16 by reference.
es_mbb_i32_r Bind a field of type ES_FLDTYPE_I32 by reference.
es_mbb_i64_r Bind a field of type ES_FLDTYPE_I64 by reference.
es_mbb_f64_r Bind a field of type ES_FLDTYPE_F64 by reference.
es_mbb_mbn_r Bind a field of type ES_FLDTYPE_MBN by reference. This includes child node fields.
es_mbb_mbu_r Bind a field of type ES_FLDTYPE_MBU by reference.
es_mbb_str_r Bind a field of type ES_FLDTYPE_STR by reference.
es_mbb_void_r Bind a field of any type by reference.

[Back To Reference]