Wt3.2.3文档翻译:Wt::Dbo::sql_value_traits< V, Enable >类模板参考,Wt::Dbo::sql_value_traits< V, Enable > Class Template Reference
这是一个针对值类型的特征类(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>中,还为以下类提供了特征类:
参考 :
潘虹
HxLauncher: Launch Android applications by voice commands