GithubHelp home page GithubHelp logo

plcreed / qtdao Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daonvshu/qtdao

0.0 0.0 0.0 5.26 MB

数据库对象操作类

Home Page: https://daonvshu.github.io/QtDao/

License: MIT License

C++ 96.27% C 0.41% QMake 1.20% CMake 2.12%

qtdao's Introduction

qt database object library

这是一个数据库查询与对象转换的操作库,支持基本增删改查操作,它能简单的将查询结果转换为定义好的类实例,基本原理是通过代码生成器和模板配合进行转换,下面是一个简单的示例展示了如何查询一个结果

Test1::Fields sf1;
Test1 d1 = dao::_select<Test1>()
        .filter(sf1.name == "client", _or(sf1.number == 12, sf1.name == "bob"))
        .build().one();

等价于下面的sql语句:

select *from test1 where name='client' and (number=12 or name='bob')

下面是当前受支持的数据库

  • sqlite
  • mysql
  • sqlserver

如何使用

https://daonvshu.github.io/QtDao/

qtdao's People

Contributors

daonvshu avatar

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.