mysqlpp:: Query类存储了Connection的指针,可以用它进行SQL语句的增删改查。

mysql++ Query

 

连上数据库后,使用mysqlpp::Connection::query()获取Query对象

Query有一些最基本的用法,包括

  • 直接利用已经拼凑好了的SQL语句调用mysqlpp::Query::exec*(),mysqlpp::Query::store()或者mysqlpp::Query::use()
  • 使用ostream接口,像构造cout一样构造SQL语句,然后再调用mysqlpp::Query::exec*(),mysqlpp::Query::store()或者mysqlpp::Query::use()
  • 类似于printf一样使用template queries
  • 类似于Hibernate那样使用Specialized SQL Structures feature(SSQLS)

 

相关文章:

  • 2021-08-16
  • 2021-11-20
  • 2021-06-25
  • 2022-12-23
  • 2021-12-26
  • 2021-07-08
  • 2021-07-06
猜你喜欢
  • 2021-07-10
  • 2021-07-16
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案