20.01.2014 Views

SIS - Application Programmatic Interface, Reference Manual - ICS ...

SIS - Application Programmatic Interface, Reference Manual - ICS ...

SIS - Application Programmatic Interface, Reference Manual - ICS ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>SIS</strong>-<strong>Application</strong> <strong>Programmatic</strong> <strong>Interface</strong>, <strong>Reference</strong> <strong>Manual</strong><br />

that took place between a begin_transaction() and an end_transaction() have<br />

not been committed.<br />

int abort_transaction(int sessionID)<br />

Aborts a transaction session. It returns 1 on success, APIFail(-1) on failure. In<br />

case of failure the operations that took place between a begin_transaction()<br />

and an abort_transaction() have not been committed.<br />

6.1.4 Using the locking mechanism<br />

int get_writelock(int sessionID)<br />

Gets writelock on the database. It returns APIFail on failure,<br />

API_DB_CHANGED if the database is changed since last update,<br />

API_DB_NOT_CHANGED if database has not changed.<br />

int get_readlock(int sessionID)<br />

Gets readlock on the database. It returns APIFail on failure, API_DB_CHANGED<br />

if the database is changed since last update, API_DB_NOT_CHANGED if database<br />

has not changed.<br />

int release_lock(int sessionID)<br />

Releases the lock got on the database with functions get_writelock() or<br />

get_readlock(). It returns APIFail on failure, API_DB_CHANGED if the<br />

database is changed since last update, API_DB_NOT_CHANGED if database has<br />

not changed.<br />

6.2 Set global parameters<br />

There is a set of functions that set or alter values to global parameters that effect or<br />

are used by the query functions. Such parameters are the current node where a query<br />

function may apply on, the link categories that recursive queries use for traversing<br />

link etc.<br />

Most of the functions return APIFail(-1) on error and APISucc(0) on success,<br />

except the ones that set the current node, which return the system identifier of the<br />

new current node that has been set.<br />

int reset_query(int sessionID)<br />

Reset all variables at server site so that everything is at the state they are when<br />

starting a new query session. Pop everything out of the name stack and free all<br />

temporary sets.<br />

int set_current_node(int sessionID, l_name node)<br />

Set current node the object with logical name node. If the name scope is the<br />

whole <strong>SIS</strong> base (default at the beginning of a query session or result of<br />

reset_name_scope() call) the argument must be the name of a node object<br />

otherwise it must be the logical name of a link object pointing from the current<br />

node. The function returns the system id of the current node or APIFail(-1) on<br />

failure.<br />

August 2002/v2.2.2 -11- <strong>ICS</strong>-FORTH

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!