DBStep is a lightweight C++ library for database abstraction and object/relational mapping.
It is targeted at C++ developers who need to access databases, and consists of a
set of interface classes and some drivers for common data sources.
Currently available drivers are for mysql, postgresql, sqlite, firebird and ODBC.
Database access is provided in at two levels:
- unified API for database connection, SQL execution, query result retrival
- methods for mapping class objects to database tables and query results
First level API are accessed through classes DBSTEP::Db and DBSTEP::QueryResult,
and are used used in example
dbstep_t1.cpp.
Object-relational mapping is implemented by deriving a mapped class from
DBSTEP::Record, as shown in example
dbstep_t2.cpp (simple query),
dbstep_t3.cpp (join) and
dbstep_t4.cpp
(transaction support).
This library makes heavy use of STL for memory structures, and it should be possible to port it on any architecture with a decent STL implementation. It should compile also on win32 (MSVC, Borland C++, mingw) without many problems; I've included a file (README.win32) with some information regarding project creation.
Have fun!
News
- 2004-05-13 Release 0.3.1:
- Many small fixes
- Improved compiler portability
- Included MSVC project files
- 2003-12-22 Release 0.3.0:
- Code reorganization and optimization
- Added support for ODBC data sources (tested on both Linux and win32)
- Rewrote and enhanced support for prepared statements
- API simplification
- Assorted bugfixes
- 2003-02-16 Release 0.2.0:
- Major code reorganization
- Added support for Firebird opensource database
- Added support for prepared statements
- Added support for transactions
- API simplification
- Assorted bugfixes
- 2002-08-01 Release 0.1.3:
- Code reorganization
- Merged patches from Nicolaus Andrats e Mathias Langer
- Simplified driver structure
- Assorted bugfixes
- Enhanced portability
- 2002-06-29 Release 0.1.2:
- Added preliminary support for XML export
- Fixed spurious endlines when using stringstream
- Fixed bug in DBSTEP::Record desctructor chain
- Simplified QueryResult desctructor semantics
- Field values that contain single quotes are escaped properly
- Fixed permissions in pgsql script
- Minor code reorganization
- 2002-06-15 Release 0.1.1:
- fixed some bugs for system without sstream header
- fixed Datetime handling
- updated configure script
- 2002-06-08 Initial 0.1.0 alpha release.
Author
My name is Sebastiano Suraci, I'm a software consultant in Udine, Italy.
Feel free to contact me at
sebastiano.suraciNO@SPAMadriacom.it (remove 'NO' and 'SPAM' from my email)