Giter VIP home page Giter VIP logo

sqlite_orm's Introduction

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";
}

sqlite_orm's People

Contributors

fvpalha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sqlite_orm's Issues

Foreign Key Support

Hello.

How I can to define rules to UPDATE/DELETE actions?

Regards.

Fernando Palha

Name collision

Hello there. I got a C++ sqlite3 wrapper lib called sqlite_orm too and located here. What do you think about name collision? Maybe it would be better if you change the name? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.