TIBCO ActiveSpaces®
Functions
sess.h File Reference

A session object provides the context for a thread of operations involving data grid resources. More...

Functions

TIBDG_API void tibdgSession_Commit (tibEx e, tibdgSession session)
 Commit the current transaction on this session and begin a new transaction. More...
 
TIBDG_API tibdgStatement tibdgSession_CreateStatement (tibEx e, tibdgSession session, const char *sqlString, tibProperties props)
 Create a SQL statement object. More...
 
TIBDG_API void tibdgSession_Destroy (tibEx e, tibdgSession session)
 Destroy a session. More...
 
TIBDG_API tibdgConnection tibdgSession_GetConnection (tibEx e, tibdgSession session)
 Get the connection object was used to create the session. More...
 
TIBDG_API tibdgTable tibdgSession_OpenTable (tibEx e, tibdgSession session, const char *name, tibProperties props)
 Open a table in the data grid. More...
 
TIBDG_API void tibdgSession_Rollback (tibEx e, tibdgSession session)
 Rollback a transaction on this session. More...
 

Detailed Description

A session object provides the context for a thread of operations involving data grid resources.

Function Documentation

TIBDG_API void tibdgSession_Commit ( tibEx  e,
tibdgSession  session 
)

Commit the current transaction on this session and begin a new transaction.

Committing a transaction causes the data grid to make permanent all table operations performed since the start of the current transaction.

Parameters
eThe exception object captures information about failures.
sessionThe session on which to commit the transaction.
Returns
void
TIBDG_API tibdgStatement tibdgSession_CreateStatement ( tibEx  e,
tibdgSession  session,
const char *  sqlString,
tibProperties  props 
)

Create a SQL statement object.

Parameters
eThe exception object captures information about failures.
sessionThe session from which to create to the statement object.
sqlStringThe sql string used to create the statement.
propsOptional. NULL to omit.
Returns
On success, this call returns a new statement object.
On failure, this call returns NULL.
TIBDG_API void tibdgSession_Destroy ( tibEx  e,
tibdgSession  session 
)

Destroy a session.

Release all the resources associated with this session.

If a transaction was started on this session, this call automatically rolls back the transaction.

Parameters
eThe exception object captures information about failures.
sessionThe session to be destroyed.
Returns
void
TIBDG_API tibdgConnection tibdgSession_GetConnection ( tibEx  e,
tibdgSession  session 
)

Get the connection object was used to create the session.

Parameters
eThe exception object captures information about failures.
sessionThe session from which to get the connection.
Returns
a connection object
TIBDG_API tibdgTable tibdgSession_OpenTable ( tibEx  e,
tibdgSession  session,
const char *  name,
tibProperties  props 
)

Open a table in the data grid.

A table object contains rows and columns.

Parameters
eThe exception object captures information about failures.
sessionThe session on which to create this table.
nameThe name of the table to be opened. This table must already be defined in the data grid.
propsOptional. NULL to omit.
Returns
On success, this call returns a new table object.
On failure, this call returns NULL.
TIBDG_API void tibdgSession_Rollback ( tibEx  e,
tibdgSession  session 
)

Rollback a transaction on this session.

Rolling back a transaction causes the data grid to discard all table operations performed since the start of the transaction.

Parameters
eThe exception object captures information about failures.
sessionThe session on which to rollback the transaction.
Returns
void