Archive Class ReferenceArchive class represents database that has relational or object-oriented structure and can contain object of classes derived from storeable class.
More...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| Archive () | |
| Constructor. | |
| virtual IStream * | getInputStream ()=0 |
| Create input stream. | |
| virtual OStream * | getOutputStream ()=0 |
| Create output stream. | |
| virtual bool | isOpen () const =0 |
| Check if archive is open. | |
| virtual void | open (const char *pOpenStr)=0 |
| Opens archive. | |
| virtual | ~Archive () |
| Destructor. | |
To store object in database you must do following steps:
There are two types of streams. Output stream is for storing objects into database and Input stream is for getting stream from database.
You can bind C++ variable to database column and when retrieving query results values that are binded will autmaticaly updated. Binded variables can be created from input stream or output stream
If you bind variable to input stream then every time you get an object from database binded variable will be updated. If you bind variable to output stream then every time object is inserted into database values from binded variable are inserted into database too.
There is one limitation when using binded variables and output streams - alhtoungh you can bind to any table and any column in database, but only columns from tables that are currently updated by storing object would be updated. In other words, when SQL update is constructed to store particular object this query will be extended to update binded variables _if_ they are binded to table that is used by object being updated.
Streams represents connections to database. This means that if get two streams from Archive you open two connections to database. Connections are reusable and currently they are never closed by archive. Call to Archive::open opens initial connection. Every next connection that is internally open by archive is open with the same connect string that initial connection.
|
|
Create input stream. Returned value must be deleted
Implemented in CSVArchive, and SQLArchive. |
|
|
Create output stream. Returned value must be deleted
Implemented in CSVArchive, and SQLArchive. |
|
|
Check if archive is open.
Implemented in CSVArchive, MemArchive, and SQLArchive. |
|
|
Opens archive.
Implemented in CSVArchive, MemArchive, and SQLArchive. |
| Documentation |
|---|
| Quick start |
| Examples |
| Search |
| API Documentation |
|---|
| Class hierarchy |
| Member index |
| API Reference |
| Store filters |
| Store table macros |