|
The DataBlade API supports functions in the DataBlade API library as well as a subset of functions in the ESQL/C library.
Functions in the DataBlade API function library are divided into the following categories.
The specific functions for each category are listed below.
The DataBlade API provides the following categories of functions for handling data.
Function Category | DataBlade API Function |
---|---|
Obtaining type information | Type-descriptor accessor functions: mi_type_align(), mi_type_byvalue(), mi_type_element_typedesc(), mi_type_full_name(), mi_type_length(), mi_type_maxlength(), mi_type_owner(), mi_type_precision(), mi_type_qualifier(), mi_type_scale(), mi_type_typename(), mi_typedesc_typeid() Type-identifier accessor functions: mi_typeid_equals(), mi_typeid_is_builtin(), mi_typeid_is_collection(), mi_typeid_is_complex(), mi_typeid_is_distinct(), mi_typeid_is_list(), mi_typeid_is_multiset(), mi_typeid_is_row(), mi_typeid_is_set() Other type functions: mi_get_type_source_type(), mi_type_typedesc(), mi_typename_to_id(), mi_typename_to_typedesc(), mi_typestring_to_id(), mi_typestring_to_typedesc() |
Transferring data types between machines (Server) |
mi_fix_integer(), mi_fix_smallint(), mi_get_bytes(), mi_get_date(), mi_get_datetime(), mi_get_decimal(), mi_get_double_precision(), mi_get_int8(), mi_get_integer(), mi_get_interval(), mi_get_lo_handle(), mi_get_money(), mi_get_real(), mi_get_smallint(), mi_get_string(), mi_put_bytes(), mi_put_date(), mi_put_datetime(), mi_put_decimal(), mi_put_double_precision(), mi_put_int8(), mi_put_integer(), mi_put_interval(), mi_put_lo_handle(), mi_put_money(), mi_put_real(), mi_put_smallint(), mi_put_string() |
Converting data types | mi_date_to_string(), mi_datetime_to_string(), mi_decimal_to_string(), mi_interval_to_string(), mi_lvarchar_to_string(), mi_money_to_string(), mi_string_to_date(), mi_string_to_datetime(), mi_string_to_decimal(), mi_string_to_interval(), mi_string_to_lvarchar(), mi_string_to_money() Deprecated functions: mi_binary_to_date(), mi_binary_to_datetime(), mi_binary_to_decimal(), mi_binary_to_money(), mi_date_to_binary(), mi_datetime_to_binary(), mi_decimal_to_binary(), mi_money_to_binary() |
Converting data between code sets (Server) |
mi_get_string(), mi_put_string() |
Handling collections | mi_collection_close(), mi_collection_copy(), mi_collection_create(), mi_collection_delete(), mi_collection_fetch(), mi_collection_free(), mi_collection_insert(), mi_collection_open(), mi_collection_open_with_options(), mi_collection_update() |
Managing varying-length structures | mi_get_vardata(), mi_get_vardata_align(), mi_get_varlen(), mi_lvarchar_to_string(), mi_new_var(), mi_set_vardata(), mi_set_vardata_align(), mi_set_varlen(), mi_set_varptr(), mi_string_to_lvarchar(), mi_var_copy(), mi_var_free(), mi_var_to_buffer() |
Obtaining SERIAL values | mi_last_serial(), mi_last_serial8() |
Accessing multirepresentational data types |
mi_issmall_data(), mi_lo_expand(), mi_set_large() |
Handling NULL values | mi_column_nullable(), mi_fp_argisnull(), mi_fp_returnisnull(), mi_fp_setargisnull(), mi_fp_setreturnisnull(), mi_func_handlesnulls(), mi_funcarg_isnull(), mi_parameter_nullable() |
The DataBlade API provides the following categories of functions for managing sessions, threads, and transactions.
The DataBlade API provides the following categories of functions for processing SQL statements.
Function Category | DataBlade API Function |
---|---|
Sending SQL statements | Executable-statement functions: mi_exec(), mi_query_finish(), mi_query_interrupt() Prepared-statement functions: mi_close_statement(), mi_drop_prepared_statement(), mi_exec_prepared_statement(), mi_fetch_statement(), mi_open_prepared_statement(), mi_prepare() |
Obtaining statement information | Input-parameter functions: mi_parameter_count(), mi_parameter_nullable(), mi_parameter_precision(), mi_parameter_scale(), mi_parameter_type_id(), mi_parameter_type_name() Other statement functions: mi_binary_query(), mi_current_command_name(), mi_get_id(), mi_get_statement_row_desc(), mi_statement_command_name() |
Obtaining result information | mi_get_result(), mi_result_command_name(), mi_result_row_count() |
Retrieving rows and row data, as well as row types and row-type data | Row-descriptor functions: mi_get_row_desc(), mi_get_row_desc_from_type_desc(), mi_get_row_desc_without_row(), mi_row_desc_create(), mi_row_desc_free(), Row-structure functions: mi_next_row(), mi_row_create(), mi_row_free(), |
Retrieving columns | Column-information functions: mi_column_count(), mi_column_id(), mi_column_name(), mi_column_nullable(), mi_column_precision(), mi_column_scale(), mi_column_type_id(), mi_column_typedesc() Column-value functions: mi_value(), mi_value_by_name() |
Using save sets | mi_save_set_count(), mi_save_set_create(), mi_save_set_delete(), mi_save_set_destroy(), mi_save_set_get_first(), mi_save_set_get_last(), mi_save_set_get_next(), mi_save_set_get_previous(), mi_save_set_insert(), mi_save_set_member() |
The DataBlade API provides the following routines for executing user-defined routines (UDRs).
Function Category | DataBlade API Function |
---|---|
Accessing the MI_FPARAM structure | mi_fp_argisnull(), mi_fp_arglen(), mi_fp_argprec(), mi_fp_argscale(), mi_fp_argtype(), mi_fp_funcstate(), mi_fp_getcolid(), mi_fp_nargs(), mi_fp_nrets(), mi_fp_request(), mi_fp_retlen(), mi_fp_retprec(), mi_fp_retscale(), mi_fp_rettype(), mi_fp_returnisnull(), mi_fp_setargisnull(), mi_fp_setarglen(), mi_fp_setargprec(), mi_fp_setargscale(), mi_fp_setargtype(), mi_fp_setfuncid(), mi_fp_setfuncstate(), mi_fp_setisdone(), mi_fp_setnargs(), mi_fp_setnrets(), mi_fp_setretlen(), mi_fp_setretprec(), mi_fp_setretscale(), mi_fp_setrettype(), mi_fp_setreturnisnull() |
Allocating an MI_FPARAM structure | mi_fp_usr_fparam(), mi_fparam_allocate(), mi_fparam_copy(), mi_fparam_free() |
Using the Fastpath interface | mi_cast_get(), mi_func_desc_by_typeid(), mi_routine_end(), mi_routine_exec(), mi_routine_get(), mi_routine_get_by_typeid(), mi_td_cast_get() |
Accessing a function descriptor | mi_fparam_get(), mi_func_handlesnulls(), mi_func_isvariant(),mi_func_negator(), mi_routine_id_get() |
The DataBlade API provides the following routines for accessing the MI_FUNCARG data type, which is the data type of all parameters to selectivity and cost functions.
Function Category | DataBlade API Function |
---|---|
Accessing the MI_FUNCARG data type | mi_funcarg_get_argtype(), mi_funcarg_get_colno(), mi_funcarg_get_constant(), mi_funcarg_get_datalen(), mi_funcarg_get_datatype(), mi_funcarg_get_distrib(), mi_funcarg_get_routine_id(), mi_funcarg_get_routine_name(), mi_funcarg_get_tabid(), mi_funcarg_isnull() |
The following DataBlade API functions manage memory.
Function Category | DataBlade API Function |
---|---|
Managing memory | mi_alloc(), mi_call(), mi_dalloc(), mi_free(), mi_switch_mem_duration(), mi_zalloc() |
The DataBlade API provides the following routines for handling exceptions.
Function Category | DataBlade API Function |
---|---|
Raising a database exception | mi_db_error_raise() |
Accessing an error descriptor | mi_errmsg(), mi_error_desc_copy(), mi_error_desc_destroy(), mi_error_desc_finish(), mi_error_desc_is_copy(), mi_error_desc_next(), mi_error_level(), mi_error_sqlcode(), mi_error_sql_state() |
Using callback functions | mi_default_callback(), mi_disable_callback(), mi_enable_callback(), mi_register_callback(), mi_retrieve_callback(), mi_unregister_callback() |
The DataBlade API provides the following routines for handling smart large objects.
Function Category | DataBlade API Function |
---|---|
Creating a smart large object | mi_lo_copy(), mi_lo_create(), mi_lo_expand(), mi_lo_from_file() |
Performing I/O on a smart large object | mi_lo_close(), mi_lo_from_buffer(), mi_lo_lock(), mi_lo_open(), mi_lo_read(), mi_lo_readwithseek(), mi_lo_seek(), mi_lo_stat(), mi_lo_tell(), mi_lo_to_buffer(), mi_lo_truncate(), mi_lo_write(), mi_lo_writewithseek() |
Moving smart large objects to and from operating-system files | mi_file_to_file(), mi_lo_from_file(), mi_lo_from_file_by_lofd(), mi_lo_to_file() |
Manipulating LO handles | mi_get_lo_handle(), mi_lo_alter(), mi_lo_decrefcount(), mi_lo_filename(), mi_lo_increfcount(), mi_lo_invalidate(), mi_lo_from_string(), mi_lo_lolist_create(), mi_lo_ptr_cmp(), mi_lo_release(), mi_lo_to_string(), mi_lo_truncate(), mi_lo_validate(), mi_put_lo_handle() |
Handling LO-specification structures | mi_lo_colinfo_by_ids(), mi_lo_colinfo_by_name(), mi_lo_spec_free(), mi_lo_spec_init(), mi_lo_specget_def_open(), mi_lo_specget_estbytes(), mi_lo_specget_extsz(), mi_lo_specget_flags(), mi_lo_specget_maxbytes(), mi_lo_specget_sbspace(), mi_lo_specset_def_open(), mi_lo_specset_estbytes(), mi_lo_specset_extsz(), mi_lo_specset_flags(), mi_lo_specset_maxbytes(), mi_lo_specset_sbspace() |
Handling smart-large-object status | mi_lo_stat(), mi_lo_stat_atime(), mi_lo_stat_cspec(), mi_lo_stat_ctime(), mi_lo_stat_free(), mi_lo_stat_mtime_sec(), mi_lo_stat_refcnt(), mi_lo_stat_size() |
Important: In these reference pages, the term "smart large object" refers to either a BLOB or CLOB object. References to a single type of smart large object use the data type specification.
The DataBlade API also provides the following routines for backward compatibility with the Illustra large-object interface.
Function Category | DataBlade API Function |
---|---|
Illustra large-object interface | Deprecated functions: mi_file_to_large_object(), mi_large_object_copy(), mi_large_object_copy_opts(), mi_large_object_create(), mi_large_object_create_opts(), mi_large_object_decrefcount(), mi_large_object_expand(), mi_large_object_filename(), mi_large_object_increfcount(), mi_large_object_info(), mi_large_object_map(), mi_large_object_open(), mi_large_object_pin(), mi_large_object_read(), mi_large_object_readwithseek(), mi_large_object_seek(), mi_large_object_stat(), mi_large_object_tell(), mi_large_object_to_file(), mi_large_object_unmap(), mi_large_object_unpin(), mi_large_object_write() |
Tip: Informix provides support for the Illustra Large-Object interface for backward compatibility only. Use the corresponding function in the smart-large-object interface for all new DataBlade API modules.
Using the Operating-System File Interface
The DataBlade API provides the following function to access operating-system files.
Function Category | DataBlade API Function |
---|---|
Using the operating-system file interface | mi_file_close(), mi_file_errno(), mi_file_open(), mi_file_read(), mi_file_seek(), mi_file_sync(), mi_file_tell(), mi_file_unlink(), mi_file_write() Deprecated function: mi_file_allocate() |
The DataBlade API provides the following functions for tracing within a user-defined routine.
Function Category | DataBlade API Function |
---|---|
Tracing | mi_tracefile_set(), mi_tracelevel_set() |
The DataBlade API provides the following functions for managing databases in a client LIBMI application.
Function Category | DataBlade API Function |
---|---|
Managing databases | mi_dbcreate(), mi_dbdrop(), mi_get_dbnames() |
The DataBlade API provides the following miscellaneous functions.
Function Category | DataBlade API Function |
---|---|
Miscellaneous | mi_client(), mi_client_locale(), mi_library_version() |
The Informix ESQL/C function library provides functions for data conversion of the following data types.
Function Category | Informix ESQL/C Library Function |
---|---|
Byte | bycmpr(), bycopy(), byfill(), byleng() |
Character processing | ldchar(), rdownshift(), rstod(), rstoi(), rstol(), rupshift(), stcat(), stchar(), stcmpr(), stcopy(), stleng() |
DECIMAL-type, MONEY-type | decadd(), deccmp(), deccopy(), deccvasc(), deccvdbl(), deccvint(), deccvlong(), decdiv(), dececvt() and decfcvt(), decmul(), decround(), decsub(), dectoasc(), dectodbl(), dectoint(), dectolong(), dectrunc(), rfmtdec() |
DATE-type | rdatestr(), rdayofweek(), rdefmtdate(), rfmtdate(), rjulmdy(), rleapyear(), rmdyjul(), rstrdate(), rtoday() |
DATETIME-type | dtaddinv(), dtcurrent(), dtcvasc(), dtcvfmtasc(), dtextend(), dtsub(), dtsubinv(), dttoasc(), dttofmtasc() |
INTERVAL-type | incvasc(), incvfmtasc(), intoasc(), intofmtasc(), invdivdbl(), invdivinv(), invextend(), invmuldbl() |
INT8-type | ifx_int8add(), ifx_int8cmp(), ifx_int8copy(), ifx_int8cvasc(), ifx_int8cvdbl(), ifx_int8cvdec(), ifx_int8cvflt(), ifx_int8cvint(), ifx_int8cvlong(), ifx_int8div(), ifx_int8mul(), ifx_int8sub(), ifx_int8toasc(), ifx_int8todbl(), ifx_int8todec(), ifx_int8toflt(), ifx_int8toint(), ifx_int8tolong() |
Other C-language data types | rfmtdouble(), rfmtlong() |
The Informix ESQL/C function library does provide additional functions. However, any function not listed in the preceding table is not valid within a DataBlade API module.