Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


Architecture


Micro API routines may be divided into four major categories, depending on how they are used. These routine categories are:

All API routines having string parameters come in two different flavors depending on which character string format is used. The rationale is that the base routine considers all strings to be null terminated wchar_t * strings. If the routine has string parameters, there is a companion routine suffixed with C, which accepts the string parameters as null terminated char * strings, where the character set is defined by the current locale.

Session Management

In the Micro API, the following routines are used for managing sessions; beginning and ending sessions, and beginning and ending transactions:

The flow of calls should be according to the below. First, a session is started using a call to MimerBeginSession (or MimerBeginSessionC, depending on the data types supplied).

Then database operations take place, either separately (in auto-committed transactions), or grouped in explicit transactions. The boundaries of an explicit transaction are marked using the calls to MimerBeginTransaction and MimerEndTransaction. (See Transactions for more information about transactions in the Micro API.)

This process continues until the application terminates its database session through a call to MimerEndSession.

 MimerBeginSession[C]
 loop
 {
     MimerBeginTransaction
     <statement and data management routines>
     MimerEndTransaction
 }
 MimerEndSession

Statement Management

The routines used to manage statements are:

Which routines to use basically depends on if the statement has input or output parameters, and if a result set is returned or not.

No input or output parameters, no result set

The MimerExecuteStatement[C] routine is mainly intended for DDL statements (i.e. data definition language statements, e.g. create and drop table.) However, it can also be used for UPDATE, INSERT, DELETE and CALL statements without parameters.

 MimerExecuteStatement[C]

Input or output parameters, but no result set

The MimerExecute routine is used for INSERT, UPDATE and DELETE statements, assignments (SET), and procedure calls which do not return a result set.

 MimerBeginStatement[C]
 <data input routines>
 MimerExecute
 <data output routines>
 MimerEndStatement

Result set producing statements

Result sets are returned by SELECT statements, as well as by calls to result set procedures. A result set is accessed using a cursor.

 MimerBeginStatement[C]
 <data input routines>
 MimerOpenCursor
 loop
 {
     MimerFetch/MimerFetchSkip/MimerFetchScroll
     <data output routines>
 }
 MimerCloseCursor
 MimerEndStatement

Data Input Routines

Input data management routines are used to supply input parameter data to statements. The data management routines to set input parameter data are:

Data Output Routines

The output data management routines used to obtain statement results are:


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX