Mapi Interface

The complete MAPI library is available to setup communication between mserver and clients.

Clients may initialize a private listener to implement specific services. For example, in an OLTP environment it may make sense to have a listener for each transaction type, which simply parses a sequence of transaction parameters.

Authorization of access to the server is handled as part of the client record initialization phase.

This library internally uses pointer handles, which we replace with an index in a locally maintained table. It provides a handle to easily detect havoc clients.

A cleaner and simpler interface for distributed processing is available in the module remote.

MODULE mapi;

PATTERN mapi.bind(X_0:int, X_1:str):bat[:any_2];
COMMENT "";

PATTERN mapi.bind(X_0:int, X_1:str, X_2:str, X_3:int):bat[:any_2];
COMMENT "";

PATTERN mapi.bind(X_0:int, X_1:str, X_2:str, X_3:str, X_4:int):bat[:any_2];
COMMENT "";

PATTERN mapi.connect(X_0:str, X_1:int, X_2:str, X_3:str, X_4:str):int;
COMMENT "";

COMMAND mapi.destroy(X_0:int):void;
COMMENT "";

COMMAND mapi.disconnect(X_0:int):void;
COMMENT "";

COMMAND mapi.disconnect():int;
COMMENT "";

COMMAND mapi.disconnect(X_0:str):int;
COMMENT "";

COMMAND mapi.error(X_0:int):int;
COMMENT "";

COMMAND mapi.explain(X_0:int):str;
COMMENT "";

COMMAND mapi.fetch_all_rows(X_0:int):lng;
COMMENT "";

COMMAND mapi.fetch_field(X_0:int, X_1:int):bte;
COMMENT "";

COMMAND mapi.fetch_field(X_0:int, X_1:int):int;
COMMENT "";

COMMAND mapi.fetch_field(X_0:int, X_1:int):lng;
COMMENT "";

COMMAND mapi.fetch_field(X_0:int, X_1:int):oid;
COMMENT "";

COMMAND mapi.fetch_field(X_0:int, X_1:int):sht;
COMMENT "";

COMMAND mapi.fetch_field(X_0:int, X_1:int):str;
COMMENT "";

COMMAND mapi.fetch_field(X_0:int, X_1:int):void;
COMMENT "";

COMMAND mapi.fetch_field_array(X_0:int):bat[:str];
COMMENT "";

COMMAND mapi.fetch_line(X_0:int):str;
COMMENT "";

COMMAND mapi.fetch_reset(X_0:int):int;
COMMENT "";

COMMAND mapi.fetch_row(X_0:int):int;
COMMENT "";

COMMAND mapi.finish(X_0:int):int;
COMMENT "";

COMMAND mapi.getError(X_0:int):str;
COMMENT "";

COMMAND mapi.get_field_count(X_0:int):int;
COMMENT "";

COMMAND mapi.get_row_count(X_0:int):lng;
COMMENT "";

COMMAND mapi.listen():int;
COMMENT "";

COMMAND mapi.listen(X_0:int):int;
COMMENT "";

COMMAND mapi.listen(X_0:str):int;
COMMENT "";

COMMAND mapi.lookup(X_0:str):int;
COMMENT "";

COMMAND mapi.malclient(X_0:streams, X_1:streams):void;
COMMENT "";

COMMAND mapi.next_result(X_0:int):int;
COMMENT "";

COMMAND mapi.ping(X_0:int):int;
COMMENT "";

COMMAND mapi.prelude():int;
COMMENT "";

COMMAND mapi.prepare(X_0:int, X_1:str):int;
COMMENT "";

PATTERN mapi.put(X_0:int, X_1:str, X_2:any_1):void;
COMMENT "";

PATTERN mapi.put(X_0:str, X_1:any_1):str;
COMMENT "";

COMMAND mapi.query(X_0:int, X_1:str):int;
COMMENT "";

PATTERN mapi.query_array(X_0:int, X_1:str, X_2:str...):int;
COMMENT "";

COMMAND mapi.query_handle(X_0:int, X_1:str):int;
COMMENT "";

COMMAND mapi.reconnect(X_0:int):void;
COMMENT "";

PATTERN mapi.reconnect(X_0:str, X_1:int, X_2:str, X_3:str, X_4:str, X_5:str):int;
COMMENT "";

PATTERN mapi.reconnect(X_0:str, X_1:int, X_2:str, X_3:str, X_4:str):int;
COMMENT "";

COMMAND mapi.resume():void;
COMMENT "";

COMMAND mapi.rows_affected(X_0:int):lng;
COMMENT "";

PATTERN mapi.rpc(X_0:int, X_1:str):bat[:any_2];
COMMENT "";

PATTERN mapi.rpc(X_0:int, X_1:str...):any;
COMMENT "";

COMMAND mapi.rpc(X_0:int, X_1:str):int;
COMMENT "";

COMMAND mapi.setAlias(X_0:int, X_1:str):void;
COMMENT "";

COMMAND mapi.stop():void;
COMMENT "";

COMMAND mapi.suspend():void;
COMMENT "";

COMMAND mapi.trace(X_0:int, X_1:int):void;
COMMENT "";