[][src]Crate extremedb_sys

extremedb_sys is a low-level FFI wrapper for the McObject's eXtremeDB database management system libraries.

This crate contains Rust declarations of the eXtremeDB API functions and a Cargo build script which locates and links the appropriate eXtremeDB libraries.

The exact set of the linked eXtremeDB libraries depends on the configuration. See the discussion below for details.

Configuration

Native eXtremeDB applications have to link with a number of eXtremeDB libraries. Both static and dynamic linking is possible. Some of these libraries are interchangeable, and the applications choose the appropriate ones depending on their requirements. For example, the applications can choose one of the supported transaction managers: Exclusive, MURSIW, or MVCC. There are other features which require linking specific libraries. Refer to the eXtremeDB reference manual for more details.

This approach is beneficial for the performance of the applications, since they can avoid linking libraries they do not need. Furthermore, there is no dynamic dispatch required: if the application links with the MURSIW transaction manager library, then its functions are called directly.

However, this approach is not quite compatible with the Rust's typical build process. Most packages choose to use Cargo features to enable optional functionality. The features are designed to be additive, and cannot be mutually exclusive. Because of this, extremedb_sys uses environment variables for configuration.

Environment Variables

extremedb_sys requires all of the following variables to be set. Since the selection of the appropriate features is critical for the correct functioning of the applications, these variables have no default values. If any of them is missing, the build process is aborted.

  • MCO_ROOT: path to the eXtremeDB root directory.
  • MCORS_CFG_DYLIB: defines how the eXtremeDB libraries are to be linked:
    • 0: statically;
    • 1: dynamically.
  • MCORS_CFG_DPTR: selects the eXtremeDB implementation libraries:
    • 0: offset libraries;
    • 1: direct pointer libraries.
  • MCORS_CFG_DISK: configures database persistence:
    • 0: in-memory database;
    • 1: disk or mixed mode database.
  • MCORS_CFG_SHMEM: configures shared memory support:
    • 0: conventional memory;
    • 1: shared memory.
  • MCORS_CFG_TMGR: selects the transaction manager library:
    • excl (exclusive);
    • mursiw;
    • mvcc.

Features

Non-mutually-exclusive options can be enabled using the Cargo features.

The following features are supported. Applications are not expected to set them explicitly; they are configured by the extremedb crate.

  • sequences — Sequences (vertical storage).
  • sql — SQL engine (local and remote).

Modules

MCO_COMMIT_POLICY_E
MCO_COMPRESSION_MASK_
MCO_DB_MODE_MASK_
MCO_LOG_TYPE_
MCO_RET_E_
MCO_TRANS_SCHED_POLICY_E_
mco_file_open_flags

Structs

mco_datalayout_t_
mco_db_params_t_
mco_db_t_
mco_ddl_dictionary_t_
mco_device_t_
mco_device_t___bindgen_ty_1__bindgen_ty_1
mco_device_t___bindgen_ty_1__bindgen_ty_2
mco_device_t___bindgen_ty_1__bindgen_ty_3
mco_device_t___bindgen_ty_1__bindgen_ty_4
mco_device_t___bindgen_ty_1__bindgen_ty_5
mco_device_t___bindgen_ty_1__bindgen_ty_6
mco_dict_class_info_t_
mco_dict_collation_t_
mco_dict_event_t_
mco_dict_field_t_
mco_dict_index_field_t_
mco_dict_index_t_
mco_dict_struct_t_
mco_dictionary_t_
mco_log_params_t_
mco_runtime_info_t_

Functions

mco_db_close
mco_db_connect
mco_db_disconnect
mco_db_kill
mco_db_open_dev
mco_db_params_init
mco_get_runtime_info
mco_runtime_getoption
mco_runtime_setoption
mco_runtime_start
mco_runtime_stop
mco_strerror

Type Definitions

MCO_COMMIT_POLICY
MCO_COMPRESSION_MASK
MCO_DB_MODE_MASK
MCO_LOG_TYPE
MCO_RET
MCO_TRANS_SCHED_POLICY
int1
int2
int4
mco_bool
mco_counter32_t
mco_datalayout_t
mco_datetime
mco_db_h
mco_db_params_t
mco_device_h
mco_device_t
mco_device_t_dev
mco_device_t_dev_conv
mco_device_t_dev_file
mco_device_t_dev_idesc
mco_device_t_dev_multifile
mco_device_t_dev_named
mco_device_t_dev_raid
mco_dict_class_info_t
mco_dict_collation_t
mco_dict_event_t
mco_dict_field_t
mco_dict_h
mco_dict_index_field_t
mco_dict_index_t
mco_dict_struct_t
mco_dictionary_h
mco_dictionary_t
mco_dictionary_t_init_d_data
mco_dictionary_t_init_i_data
mco_hash_counter_t
mco_int1
mco_int2
mco_int4
mco_int8
mco_iquad
mco_log_params_t
mco_offs32_t
mco_offs32_sig_t
mco_offs_t
mco_runtime_info_t
mco_size_t
mco_uint1
mco_uint2
mco_uint4
mco_uint8
mco_uquad
size_t
uint1
uint2
uint4
uint8

Unions

mco_device_t___bindgen_ty_1
mco_dictionary_t___bindgen_ty_1
mco_dictionary_t___bindgen_ty_2