Uniform Database Access (UDA)

The UDA API is explained with code examples in the User's Guide section. Following is the API Reference Guide:

Meta-dictionary and Dictionary structure management

mco_metadict_size
Returns the size of the meta-dictionary.
mco_metadict_init
Initializes the meta-dictionary.
mco_metadict_register
Registers a database dictionary in the meta-dictionary.
mco_metadict_count
Returns the number of registered databases.
mco_metadict_entry
Returns a pointer to a dictionary.
mco_metadict_entry_name
Returns a dictionary entry descriptor by name.
mco_metadict_entry_conn
Returns a dictionary entry descriptor by connection.
mco_dict_struct_count
Returns the number of structures/classes for a dictionary.
mco_dict_struct
Returns a structure/class descriptor.
mco_dict_struct_name
Returns the descriptor for the structure/class referred to by name.
mco_dict_struct_classcode
Returns the descriptor for the structure/class referred to by its class code.
mco_dict_field
Returns a field descriptor.
mco_dict_field_name
Returns a field descriptor by name.
mco_dict_field_init_data
Returns a pointer to the field’s default data value.
mco_dict_index
Returns an index descriptor.
mco_dict_index_name
Returns an index descriptor by name.
mco_dict_ifield
Returns an index field descriptor.
mco_dict_ifield_name
Returns an index field descriptor by name.
mco_dict_nested_ifield
Returns a nested field descriptor.
mco_dict_event
Returns an event descriptor.
mco_dict_collation
Returns a collation descriptor.
mco_dict_collation_count
Returns the number of collation descriptors.
mco_dict_collation_name
Returns a collation descriptor by name.

Database Control and Data Access

mco_uda_db_open
Opens the database for UDA.
mco_uda_db_close
Closes the database for UDA.
mco_uda_get_udfmap_size
Returns the amount of memory necessary to keep information about all user-defined functions at runtime.
mco_uda_register_udf
Registers user-defined functions.
mco_uda_new
Allocates a new object.
mco_uda_delete
Removes an object.
mco_uda_delete_all
Deletes all objects of the specified class.
mco_uda_checkpoint
Inserts a new object into indexes.
mco_uda_get_class_code
Gets the “native” class code.
mco_uda_updated_bitmap_get_fld
Returns the field number and position of the updated field.
mco_uda_to_mco
Makes a “native” object handle from a UDA object handle.
mco_uda_from_mco
Makes a UDA object handle from a “native” database object.
mco_uda_lookup
Performs a database lookup.
mco_uda_get
Returns the field value.
mco_uda_put
Assigns the field value.
mco_uda_blob_append
Appends to a BLOB field.
mco_uda_field_alloc
Allocates vector elements.
mco_uda_field_erase
Removes an optional structure field or vector element.
mco_uda_field_free
Removes an optional structure field or vector element DEPRECATED.
mco_uda_pattern_search
Performs a database pattern search.
mco_uda_pattern_next
Moves cursor position to the next match in the pattern search.
mco_uda_pattern_size
Returns the amount of memory required for this search pattern.

Cursor Control, Events and Collation Management

mco_uda_cursor
Initializes a cursor.
mco_uda_from_cursor
Returns a handle to the object in the cursor.
mco_uda_cursor_info
Returns information about the index associated with the cursor.
mco_uda_length
Returns the size (length) of a vector or array.
mco_uda_oid_find
Searches for the object with the specified oid.
mco_uda_locate
Positions the cursor in the index.
mco_uda_compare
Compares the value(s) referenced by the current position of the cursor with specified value(s).
mco_uda_register_event_handler
Registers an event handler.
mco_uda_unregister_event_handler
Unregisters an event handler.
mco_uda_async_event_wait
Blocks the thread until the event is fired.
mco_uda_async_event_release
Releases the specified event handler.
mco_uda_async_event_release_all
Releases all event handlers.
mco_uda_register_collation
Registers a collation.
mco_uda_get_collmap_size
Returns the size of the collation map structure.
mco_uda_collate_get
Returns a value from the specified collation.
mco_uda_collate_get_range
Returns a string value from the specified collation.