Skip to content
Simple C++ ORM for SQLite
C++ JavaScript C
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Adding example file documentation. Nov 16, 2012
ext first commit Nov 7, 2012
orm_test.xcodeproj fixed some issues which prevent from compiling using g++ Nov 7, 2012
orm_test test project added Nov 7, 2012
src fixed some issues which prevent from compiling using g++ Nov 7, 2012
LICENSE version added. LICENSE added Apr 10, 2013
README version added. LICENSE added Apr 10, 2013
VERSION version added. LICENSE added Apr 10, 2013
doxyfile Adding doc folder (doxygen) Nov 16, 2012

README

Simple C++ ORM for SQLite v0.1.
Originally this was made to support simple cases in iOS games. For example storing scores.

The ORM supports foreign collections and lazy loading.

Released under New BSD license. See LICENSE file for more details.

=== Dependencies ===
- Sqlite3pp (included. see ext)
- boost.bind, boost.any and some other boost libraries

=== Usage ===
For basic usage information please see my blog post: http://alex.tapmania.org/2011/12/simple-sqlite-orm-for-c.html
and the example project included.

- Raw SQL
db_.execute(sql.c_str());

- Query with arguments
std::map<std::string, boost::any> a;
a[":score"] = 100000;
a[":user_id"] = user.get_id();

boost::shared_ptr<score> r = score_dao_obj.query_first(
   "WHERE user_id = :user_id AND score >= :score", a);

if(score)
{
    cout << "Found score higher than 100000 for user with the given ID.\n";
}
You can’t perform that action at this time.