微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

LiteSQL C++的数据库持久层框架

程序名称:LiteSQL

授权协议: LGPL

操作系统: Windows

开发语言: C/C++

LiteSQL 介绍

Litesql一个C++的数据库持久层框架,支持 sqlite3MysqL和Postgresql数据库

示例代码

<?xml version="1.0"?>  
<!DOCTYPE database SYstem "litesql.dtd">  
<database name="PersonDatabase">  
    <object name="Person">  
        <field name="name" type="string"/>  
    </object>  
</database>

PersonDatabase db("sqlite3", "database=person.db");Person person(db); // construct Person, does not write anything to database

person.name = "Bob"; // assign values to fields  
person.age = 20;  
person.update(); // writes a new record to database

person.age = 21; // Bob got just older  
person.update(); // updates old record

person.id = 100; // force internal identifier (id) to 100   
person.update(); // updates old record

LiteSQL 官网

http://sourceforge.net/apps/trac/litesql

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐