|
NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
SQLite预处理语句类 更多...
#include <sqlite_prepared_statement.hpp>
Public 成员函数 | |
| sqlite_prepared_statement (::sqlite3 *db, const string &sql) | |
| 构造函数 | |
| sqlite_prepared_statement (sqlite_prepared_statement &&other) noexcept | |
| 移动构造函数 | |
| sqlite_prepared_statement & | operator= (sqlite_prepared_statement &&other) noexcept |
| 移动赋值运算符 | |
| ~sqlite_prepared_statement () override | |
| 析构函数 | |
| NEFORCE_NODISCARD uint32_t | param_count () const noexcept override |
| 获取参数数量 | |
| bool | bind_param (uint32_t index, string_view value) override |
| 绑定字符串视图参数 | |
| bool | bind_param (uint32_t index, const string &value) override |
| 绑定字符串参数 | |
| bool | bind_param (uint32_t index, const char *value) override |
| 绑定C字符串参数 | |
| bool | bind_param (uint32_t index, int32_t value) override |
| 绑定32位整数参数 | |
| bool | bind_param (uint32_t index, int64_t value) override |
| 绑定64位整数参数 | |
| bool | bind_param (uint32_t index, float64_t value) override |
| 绑定浮点数参数 | |
| bool | bind_param (uint32_t index, cbyte_view value) override |
| 绑定二进制数据参数 | |
| bool | execute () override |
| 执行非查询语句 | |
| unique_ptr< idb_prepared_result > | execute_query () override |
| 执行查询语句 | |
| NEFORCE_NODISCARD string_view | get_error () const noexcept override |
| 获取错误信息 | |
| NEFORCE_NODISCARD uint32_t | get_errno () const noexcept override |
| 获取错误码 | |
SQLite预处理语句类
实现idb_prepared_statement接口,提供SQLite预处理语句的完整功能。 支持参数绑定、语句执行和结果集获取。
主要功能:
在文件 sqlite_prepared_statement.hpp 第 45 行定义.
|
explicit |
构造函数
| db | SQLite数据库连接句柄 |
| sql | SQL语句(使用?作为占位符) |
使用sqlite3_prepare_v2预处理SQL语句, 获取参数数量(?占位符个数)。
引用了 sqlite_prepared_statement().
被这些函数引用 operator=(), sqlite_prepared_statement() , 以及 sqlite_prepared_statement().
|
noexcept |
|
override |
析构函数
调用sqlite3_finalize释放预处理语句资源。
|
overridevirtual |
|
inlineoverridevirtual |
绑定C字符串参数
| index | 参数索引(从1开始) |
| value | C字符串 |
在文件 sqlite_prepared_statement.hpp 第 124 行定义.
引用了 bind_param().
被这些函数引用 bind_param().
|
inlineoverridevirtual |
绑定字符串参数
| index | 参数索引(从1开始) |
| value | 字符串值 |
在文件 sqlite_prepared_statement.hpp 第 116 行定义.
引用了 bind_param() , 以及 basic_string< CharT, Traits, Alloc >::view().
被这些函数引用 bind_param().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
inlineoverridevirtualnoexcept |
|
inlineoverridevirtualnoexcept |
|
noexcept |
|
inlineoverridevirtualnoexcept |