StupidBeauty
Read times:538Posted at:Mon Mar 4 16:50:56 2013
- no title specified

Wt3.2.3文档翻译:Wt::Dbo::sql_value_traits< V, Enable >类模板参考,Wt::Dbo::sql_value_traits< V, Enable > Class Template Reference

详细说明

template<typename V, class Enable = void>
class Wt::Dbo::sql_value_traits< V, Enable >

这是一个针对值类型的特征类(Traits class)。

此特征类可针对自定义类型 V 而特化, 以便为自定义类型提供数据库对象(dbo)支持。 一个值类型与一个数据库列之间是 一对一映射的。

此库内置了对以下类型的支持:

  • •. std::string

  • •. char const * (只读:只在查询时绑定参数用)

  • •. short, int, long long

  • •. long: 在UNIX/Linux 64位系统中, long 是64位的。而在32位系统中,是32位的。所以 这种类型会根据环境的不同而映射为 integer bigint

  • •. float, double

  • •.枚举enum)类型

  • •. bool

  • •. std::vector<unsigned char> (二进制数据)

  • •. boost::optional<T>: 使得这个类型变成可选的(允许设置成结构化查询语言(SQL)空( null )值)

  • •. boost::posix_time::ptime: 时间戳,一个无效的值(例如,默认构造的值),映射为空值( null

  • •. boost::posix_time::time_duration: 时间段, 一个无效的值(boost::posix_time::not_a_date_time),映射为空值( null

在<Wt/Dbo/WtSqlTraits>中,还为以下类提供了特征类:

参考

query_result_traits

潘虹

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4