Transaction Control API (RT)
This function initiates a real-time transaction for the database referenced by db
Yes
This function is a pre-defined callback implementation that indicates to the database kernel that the application is using the adaptable deadline policy
No
Ends the current transaction
Yes
This function returns the clock start time
No
This function returns the time in milliseconds required to roll back the current transaction
No
Sets error state for the transaction
No
Returns the current transaction error code
No
This function returns the time in milliseconds left until the deadline expires
No
This function allows to change parameters of a running real-time transaction
No
The mco_trans_rt_register_callback() registers a callback function that is called by the database kernel at the cancelation points
No
The function fills in the mco_rollback_buf_info_t structure passed via rb_info
No
This function returns the handle to the active transaction or MCO_E_TRANS_NOT_ACTIVE if there is no active transaction for the given connection
No
This function is a pre-defined callback implementation that indicates to the database kernel that the application is using the strict deadline policy
No
EWSLite API
mco_lews_initialize() initializes the HTTP server parameters, including the networking interface, port, socket parameters, incoming connections handler, and spawns connection handling threads (in the multi-threaded configuration)
No
mco_lews_start() initiates the HTTP web server by activating the listening socket and starting the incoming connection handling loop
No
mco_lews_stop() stops the incoming connection handling loop (running in mco_lews_start())
No
This function checks whether a shutdown request has been issued for the EWSLite server by calling mco_lews_stop().
No
mco_lews_destroy() concludes the operations of the HTTP web server by shutting down the listening socket, finishing the connections handling threads (tasks), and releasing the utilized resources
No
The function starts listening for incoming connection on the LEWS server socket.
No
The function checks for new incoming client connections on the LEWS server socket and processes them if available.
No
The mco_lews_send_response_err() function sends a standard HTTP response with an HTTP error code
No
The mco_lews_flush() function transfers the contents of the outgoing buffer and subsequently clears the buffer
No
The mco_lews_append_http_header() function prepares and adds an HTTP response header to the outgoing buffer
No
The mco_lews_append_header_end() function completes the HTTP response header in the outgoing buffer
No
The mco_lews_get_header_value() function retrieves the value of an HTTP response header from the incoming buffer
No
The mco_lews_get_query_param_int() function retrieves the value of an integer query parameter from the incoming buffer
No
The mco_lews_get_query_param_str() function retrieves the value of a string query parameter from the incoming buffer
No
mco_lews_append_uint64() appends the string representation of an unsigned integer number to the outgoing buffer
No
mco_lews_append_int() appends the string representation of an integer number to the outgoing buffer
No
mco_lews_append_str() appends string data to the outgoing buffer
No
The mco_lews_startswith() function checks whether the given string is a prefix in the data buffer starting from the specified position.
No
This function compares string data with a segment of the buffer
No
The function checks whether the given string is a prefix in the data buffer starting from the specified position (case-insensitive).
No
This function compares string data with a segment of the buffer (case-insensitive).
No
This function encodes a string using Base64 encoding.
No
This function decodes a URL-encoded (percent-encoded) string according to RFC 3986.
No
This function checks whether the incoming request is a WebSocket request.
No
This function sends a WebSocket closing frame to the client.
No
This function sends a WebSocket data frame over an established connection.
No
This function completes the WebSocket handshake by generating and sending the HTTP 101 Switching Protocols response to the client.
No
This function checks whether the incoming request is a WebSocket close control frame.
No
This macro checks whether the HTTP request method matches the specified method string.
No
This macro checks whether the URL path in the current HTTP request exactly matches the specified url string.
No
This function initializes the provided JSON context and opens a root JSON object ({) in the output buffer of the specified connection.
No
This function closes the root JSON object ({) in the output buffer of the specified connection.
No
This function adds a new JSON array as a member of the current JSON object.
No
This function opens a new JSON object as an element of the current JSON array.
No
This function opens a new JSON array as an element of the current JSON array.
No
This function closes the current JSON object or array.
No
This function opens a new JSON object as an element of the current JSON object.
No
This function adds a string value to the current JSON object.
No
This function adds an integer value to the current JSON object.
No
This function adds an unsigned integer value to the current JSON object.
No
This function adds a string value to the current JSON array.
No
This function adds an integer value to the current JSON array.
No
This function adds an unsigned integer value to the current JSON array.
No
REST/RT API
mcorest_stop() sends the "stop" message to the RESTrt web service (informing it to finish its web service handling loop)
No
mcorest_initialize() performs initialization of the networking interface and the RESTrt web service internal parameters
No
mcorest_start() launches the RESTrt web service handling loop
No
mcorest_shutdown() completes the work of the RESTrt web service by closing the listening network socket and releasing internal resources
No
This function blocks the thread until the event referenced by event_id occurs or the application explicitly releases the event handler
No
This function unblocks all the threads that are waiting on the event referenced by event_id
No
This function unblocks all the threads that are waiting on all events for the specified database
No
Transaction Control API
This function aborts a transaction
Yes
This function completes a transaction, committing any changes to the database
Yes
This function upgrades a MCO_READ_ONLY or MCO_UPDATE transaction to MCO_READ_WRITE
Yes
This function is used by mco_translog_iterate() callback functions (part of the Transaction Logging API) when iterating through the Transaction Log file to retrieve the “counter” number which uniquely identifies a transaction
No
This function returns the type of a transaction referenced by the handle
No
This function initiates a transaction for the database referenced by db
No
This function inserts updated objects into indexes
Yes
This function provides the ability to iterate over all modifications made by a transaction, read the modified objects, and determine what kind of modifications were applied (new, update, delete)
No
This function assigns a callback function to be called when a transaction is committed or rolled back
No
This function checks whether a database transaction is currently active
No
This function enables or disables transaction iteration support for a database connection
No
This function configures runtime options that affect the behavior of the current transaction
No
Database Control API
This function destroys the connection handle to the database and invalidates any existing transaction handles for the connection
No
This function creates the database dbname on the devices defined by devs according to the parameters specified in params
No
This function destroys all database instances
No
This function loads a previously saved image of a database and opens it by internally calling mco_db_open_dev() with the passed parameters
No
This function create or open a persistent database
No
This function extends the available database memory by adding the specified memory device
No
Because object handles cannot be copied as a raw sequence of bytes (using memcpy() for example), this function is provided for rare occasions when it might be useful to copy an object handle
No
Normally a database that was not properly closed (perhaps after a system crash) will be recovered automatically during the mco_db_open_dev()
No
This function destroys the database dbname
No
This function allows an application to determine if an object has been deleted within the current transaction
Yes
This function removes the shared memory segment allocated by the runtime for the database identified by the dbname
No
This function returns the class code of the object referenced by the object handle
No
This function returns the last generated value for an object of any database class that has an autoid field defined
No
This function creates the database dbname in the space referenced by mem with an initial size of total_size (the database size can be extended) and with a page size of page_size
No
This function returns the database context data associated with this connection
No
This function extends the amount of memory used by the database
No
This function connects an application (thread) to a database
No
This function removes all objects from an opened database
No
This function connects to a database specifying connection context values that can later be accessed for application specific purposes
No
This function returns the number of bytes required to load the database registry at runtime
No
This function loads a previously saved image of a database class
No
This function is used to stream an database to permanent storage
No
This function extends the amount of memory used by the database dbname
No
This function extends the available database memory by adding the specified memory device
No
This function allows an application to explicitly recover anydatabases connections that were not properly closed
No
This function returns a list of all database names registered in the system
No
This function extends the amount of memory used by the database
No
This function returns the current and maximal number of connections to a database
No
This function sets default parameters (page sizes, number of connections, log policies, etc
No
This function inspects the state of all connections to the database using the provided user's callback function
No
No
This function registers the array of user-defined functions with the runtime
No
This function extends the available database memory by adding the specified memory device
No
This function is used to stream the entire contents of a database class to permanent storage
No
Register custom collation functions for a database instance.
No
Cursor Control API
This function determines the validity of a cursor handle and returns the cursor type if the handle is valid
No
This function positions the cursor to the next object in the index
Yes
This function allows applications to explicitly close a cursor
Yes
This function stores the cursor so that applications using the MVCC Transaction Manager can pass its handle between transacitons
Yes
This function checks the internal structure of the cursor
Yes
This function returns the class code of the object at the current cursor position
No
This function positions the cursor to the first object in the index
Yes
This function positions the cursor to the last object in the index
Yes
This function positions the cursor to the previous object in the index
Yes
Disk Manager API
This function saves the Disk Manager cache to persistent media
No
This function allows applications to obtain runtime disk manager cache statistics in structure mco_disk_cache_info_t, including cache hits and cache misses
No
This function returns the information about the current state of the Disk Manager in the mco_disk_info_t structure
No
This function loads the previously saved state of the Disk Manager cache from persistent media
No
This function allows an application to load database files into the file system cache which can give up to 8x performance improvement for traversal of database records
No
This function collects information about the distribution of free disk space.
No
This function collects information about the size of allocated and used pages in the database file.
No
Estimate the amount of disk cache memory used by persistent objects of each class.
No
Error Handling
This function returns the value of the last return code from an function that caused a transaction to enter an error state
No
This function registers an application function to handle fatal error conditions
No
Set the extended fatal error handler that accepts __FILE and __LINE parameters
No
Return a string describing the error code
No
UDA API
This function returns a field descriptor referred to by name
No
The API registers a database dictionary in the meta-dictionary
No
The API registers the database dictionaries for the current connection in the meta-dictionary
No
This function closes the database referenced by the specified index dict_no
No
This function makes a UDA object handle from a “native” database object handle.
No
Initializes a cursor based on the index specified through its number index_no
Yes
Return the length (number of elements) of the vector or array field
Yes
Removes an object from the database.
Yes
This function returns a pointer to the dictionary based on a database connection
No
Assigns the field value for the object or structure.
Yes
This function returns an index descriptor by name
No
This function returns an event descriptor based on the dictionary number, class number and the DDL field name
No
The API unregisters a database dictionary from the meta-dictionary
No
This function blocks the thread until the specified event is fired by the application, or the application explicitly releases the event handler by calling function mco_uda_async_event_release() or mco_uda_async_event_release_all()
No
Perform a database lookup
Yes
Allocate a vector field.
Yes
Compare the value(s) referenced by the current position of the index cursor with value(s) in parameter keys
Yes
This function returns the amount of memory necessary to keep information about all user-defined functions at runtime
No
This function returns a string value from the specified collation by copying from the specified starting position from to the end of the string withing the collation
Yes
Positions the cursor in the index referenced by index_no at the given object
Yes
This function deletes all objects of the specified class.
Yes
This function returns a compound index field (segment) descriptor by the nested index field with number ifield_no
No
Returns information about the index associated with the cursor
No
This function returns a pointer to the dictionary based on its index in the array metadict->entries
No
This function inserts a new object into indexes.
Yes
This function initializes the meta-dictionary
No
This function returns a compound index field (segment) descriptor by the index field name
No
The function returns the size of the meta-dictionary in bytes (including the header)
No
Returns the field value
Yes
This function returns a pointer to the dictionary based on its name metadict->entries[]->name
No
Remove an optional structure field or vector element
Yes
This function returns a compound index field (segment) descriptor by index field number ifield_no
No
This function returns a pointer to the field’s default data value by field_no
No
This function gets the “native” class code of a UDA object
No
Register a collation with the database runtime
No
This function releases all event handlers for the specified database
No
This function returns the number of collation descriptors in the dictionary
No
This function returns a field descriptor referred to by field_no
No
This function returns the structure/class descriptor referred to by the index dict_no in the array metadict->entries[] and class/structure number struct_no
No
This function returns the descriptor for the structure/class referred to by the index dict_no in the array metadict->entries[] and class/structure name (as defined in the schema )
No
This function returns the descriptor for the structure/class referred to by its class code
No
This function returns a collation descriptor based on the dictionary and collation name
No
Return a handle to the object in the cursor
Yes
This function can be used to replace mco_db_open_dev()
No
Searches the database for the object with the specified oid
Yes
This function returns the number of structures/classes for the dictionary referred to by the index dict_no in the array metadict->entries[]
No
This function returns a value from the mco_collate_h struct
Yes
This function returns an index descriptor by index_no
No
This function releases the specified event handler
No
This function returns the size of the collation map structure
No
This function Returns Returns a collation descriptor based on the dictionary and collation number
No
This function makes a “native” object handle from a UDA object handle
No
Allocates a new object
No
This function returns the number of registered databases (metadict->n_allocated)
No
Registers user-defined functions with the database runtime
No
Runtime Control API
This function sets the runtime option to the specified value
No
This function terminates the runtime and releases all resources initialized by mco_runtime_start()
No
This function reports the version and enabled features of the eXtremeDB database runtime
No
Returns the value of the specified runtime option
No
This function initializes a semaphore to coordinate access to the database dictionary
No
This function returns the maximum number of concurrent connections
No
This function returns the index number of the unique constraint that was most recently violated
No
Auxiliary Functions
This function allocates a of size bytes aligned to a multiple of the value returned by sysconf(_SC_PAGESIZE)
No
This function reallocates a block of memory previously allocated by mco_sys_malloc()
No
This function allocates an array of memory blocks each of size bytes and the space is initialized to 0
No
This function frees a memory block
No
This function frees a memory block allocated by mco_sys_valloc()
No
This function allocates a properly aligned block of memory
No
Backup API
This function creates a backup record of the database
No
This function creates a list of backup records in the specified backup file
No
This function creates a list of backup records in the specified backup file
No
This function restores the backup (specified by file_name and label) by reading the backup from the latest snapshot record up to the specified label
No
This function tests the backup (specified with a file_name and a label) for validity by reading the backup one record at a time and then checks the CRC of all of the records
No
Low-level backup routine.
No
Low-level restore routine.
No
Retrieve the current status of incremental backup processing for a database.
No
Enable or disable incremental backup processing for a database.
No
Retrieve the current progress information of an ongoing backup operation.
No
Write data chunks to a backup file.
No
Write metadata headers to a backup file.
No
Read data chunks from a backup file.
No
Miscellaneous Functions
This function converts the argument time to the corresponding value specified by the resolution argument scale
No
This function retrieves from the operating system the number of timer ticks (microseconds) since 1 Jan 1970 (Epoch)
No
This function converts the argument ticks to the corresponding value specified by the resolution argument scale
No
This function returns the frequency of the high-resolution timer
No
This function returns the number of ticks elapsed since the high-resolution timer was started.
No
This function sets a new user-defined routine for obtaining the current time in ticks
No
This function opens a file
Yes
This function sets the current wait event type for profiling and diagnostics.
No
This function clears the current wait event type for profiling and diagnostics.
No
This function returns the current version number of the database schema (dictionary).
No
This function returns into total_pages the count of in-memory pages in the database referenced by handle db
No
This function returns into free_pages the count of available in-memory pages in the database referenced by handle db
No
This function returns the number of indexes in the database
No
This function returns into page_size the page size for the database referenced by handle db
No
This function returns statistics that are maintained for the index
No
The function returns the size of the index -- the number of key values in the index structure (tree)
No
This function returns statistics that are maintained for the class
No
This function determines the modules to be logged
No
This function sets the severity level for tracing messages
No
This function registers a user-defined custom handler to be called when database operations trigger messages
No
This function returns the algorithm type supported by the encryption library currently linked
No
This function encrypts or decrypts a block of data using the specified pre-initialized encryption context crypt_cts
No
This function encrypts or decrypts a data buffer buf of size size to be placed into or retrieved from a stream
No
This function creates an encryption state structure using the pre-initialized encryption context
No
This function prepares the encryption context by a cipher key string
No
Flash Simulator API
Opens a flash media device
No
Initializes the flash simulator and opens a handle to the flash media device
No
Closes the flash simulator handle and releases all associated resources
No
Retrieves the statistics of the flash simulator
No
Prints the statistics of the flash simulator to stdout
No
Saves the simulator state image to a file
No
Retrieves the flash media context associated with the flash simulator handle
No
Returns the size of the memory segment calculated based on the flash simulator parameters
No
Retrieve the custom media context associated with a file-based device
No
STATrt API
Retrieve the total number of registered runtime statistics counters and histograms.
No
Retrieve the current value of a runtime statistics counter.
No
Retrieve the current values of all runtime statistics counters and histograms.
No
Retrieve the current values of runtime statistics counters and histograms for a specific database connection.
No
Retrieve the metadata information of a runtime statistics counter.
No
Retrieve the internal histogram index associated with a given statistics counter.
No
Append a value to the histogram associated with a given statistics counter.
No
Retrieve the current values of all buckets in the histogram associated with a given statistics counter.
No
Initialize the histogram associated with a given statistics counter.
No
Retrieve the current value of a runtime statistics counter.
No
Register a new runtime statistics counter.
No
Update the value of a runtime statistics counter.
No
Calculate the amount of memory required to store runtime statistics for a database instance.
No
Retrieve the current values of disk I/O statistics counters.
No
Retrieve the current values of disk I/O statistics counters.
No