C++封装的数据库访问库:SOCI

jopen 11年前

soci是一个用C++封装的数据库访问库,目前通过 “前端(应用程序)/核心/后端(数据库适配)”模式支持firebird,mysql,sqlite3,oracle,postgresql,odbc 多种数据库;作为扩展,您也可以自己针对具体不同库或应用编写自定义后端代码。貌似另外一个poco开源库的数据库封装系参考soci;

int id = 0;  Person p;  session sql(oracle, connectString);sql << "select first_name, last_name, date_of_birth "         "from persons where id = " << id,         into(p);

项目主页:http://www.open-open.com/lib/view/home/1357657072137