|
NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
|
ORM 对象-关系映射器 更多...
#include "NeForce/core/reflect/reflect.hpp"#include "NeForce/core/string/string.hpp"#include "NeForce/db/db_interface.hpp"#include "NeForce/db/sql_builder.hpp"类 | |
| class | neforce::sql_mapper< T > |
| ORM 对象-关系映射器 更多... | |
函数 | |
| string | neforce::cpp_type_to_sql_type (const reflect::type_id tid) |
| 将 C++ 类型 ID 映射为 SQL 类型名称 | |
| reflect::meta_any | neforce::read_column_by_type (const idb_tb_result &row, const size_t col, const reflect::type_id tid) |
| 从结果行中按类型ID读取值到 meta_any | |
| string | neforce::meta_any_to_sql_literal (const reflect::meta_any &val) |
| 将 meta_any 值转换为 SQL 字面量字符串 | |
ORM 对象-关系映射器
纯运行时消费反射元数据,自动生成 SQL 语句并完成实体与结果行之间的映射。 依赖 reflect_scanner 或手动注册的反射元数据。
使用示例:
在文件 sql_mapper.hpp 中定义.