SQLOStream Class Reference
[Public API]

OStream implementation for SQL based archives. More...

#include <sqlostream.h>

Inheritance diagram for SQLOStream:

Inheritance graph
[legend]
Collaboration diagram for SQLOStream:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void begin ()
 Create transaction on stream.
virtual void close ()
 Close stream.
virtual void commit ()
 Commit all changes made to stream from point where begin() was called.
virtual void destroy ()
 Destroy stream.
const ConvSpecgetConversionSpecs () const
 Get conversion specification used by this stream.
virtual bool isOpen () const
 Check if stream is open.
virtual void open (const char *pMainTable=NULL)
 Open stream and prepare it to object store.
SQLOStreamoperator= (const SQLOStream &)
 Assigment opearator increases internal DbConnection usage.
virtual void rollback ()
 Cancel all changes to stream from point where begin() was called.
int sendUpdate (const char *const pQuery)
 Send SQL update query to database and get results.
 SQLOStream (const SQLOStream &pStream)
 Copy constructor increases internal DbConnection usage.

Protected Attributes

DbConnectionmConn
 used connection
SQLIdFetchermFetcher
 object responsible for assigning id for newly created Storeable

Detailed Description

OStream implementation for SQL based archives.


Member Function Documentation

virtual void begin  )  [virtual]
 

Create transaction on stream.

Changes in database will be all commited only after calling close().

Implements OStream.

virtual void commit  )  [virtual]
 

Commit all changes made to stream from point where begin() was called.

Note:
You should use dba::Transaction object instead of calling this method

Implements OStream.

virtual void destroy  )  [virtual]
 

Destroy stream.

After call to this function stream is destroyed and cannot be opened any more. It usually means that connection to database that this stream represents is closed after this method was called

Implements Stream.

const ConvSpec& getConversionSpecs  )  const
 

Get conversion specification used by this stream.

Returns:
conversion specifications

virtual bool isOpen  )  const [virtual]
 

Check if stream is open.

Returns:
true if stream is open, false otherwise.

Reimplemented from Stream.

virtual void open const char *  pMainTable = NULL  )  [virtual]
 

Open stream and prepare it to object store.

Parameters:
pMainTable custom root table name for object. If

Implements OStream.

virtual void rollback  )  [virtual]
 

Cancel all changes to stream from point where begin() was called.

Note:
You should use dba::Transaction object instead of calling this method

Implements OStream.

int sendUpdate const char *const   pQuery  ) 
 

Send SQL update query to database and get results.

Parameters:
pQuery query to send.

The documentation for this class was generated from the following file:

Documentation
Quick start
Examples
Search

API Documentation
Class hierarchy
Member index
API Reference
Store filters
Store table macros
Back

Generated by doxygen at Sun Nov 9 02:08:27 2008