通过libcouchbase-cxx发出准备好的/参数化的查询
Issuing prepared/parameterized queries through libcouchbase-cxx
我是全新的couchbase,我正在开发一个客户端,需要通过c++客户端库(https://github.com/couchbaselabs/libcouchbase-cxx)发出准备/参数化的n1ql查询。发出静态查询很简单,但是我还没有找到发出准备好的查询的正确过程。有人能做到吗?
下面的文档/示例展示了如何使用准备好的stmt。
http://developer.couchbase.com/documentation/server/4.5/sdk/c/n1ql-queries-with-sdk.htmlhttps://github.com/couchbaselabs/devguide - examples/blob/server 4.5 -/- c/query placeholders.cc
// To enable using prepared (optimized) statements, you can use
// the LCB_CMDN1QL_F_PREPCACHE flag. This is equivalent to setting
// 'adhoc=False' in other SDKs
cmd.cmdflags |= LCB_CMDN1QL_F_PREPCACHE;
rc = lcb_n1p_mkcmd(params, &cmd);
rc = lcb_n1ql_query(instance, &rows, &cmd);
lcb_wait(instance);
普拉萨德
相关文章:
- Mongodb c++驱动程序:如何查询元素的数组
- 如何反转整数参数包
- 使用C++库在Android项目中修改gradle中的cmake参数,用于插入指令的测试
- 如何使用默认参数等选择模板专业化
- 模板参数替换失败,并且未完成隐式转换
- 具有默认模板参数的多态类的模板推导失败
- lambda参数转换为constexpr技巧,然后获取带链接的数组
- 将数组作为参数传递给函数安全吗?作为第三方职能部门,可以探索他们想要的之外的其他元素
- Qt SQLite没有查询或参数计数不匹配
- 如何在 C++ 生成器 10.2 中将查询转换为参数查询
- QXmlQuery::setQuery() 当我将源代码传递给其参数时无法查询
- 每个新客户端的 GStreamer 和 URI 查询参数提取
- 查询lambda/函数的参数数
- 等键在 boost::unordered_multimap 中起作用:查询键是否保证是第一个参数
- ODBC API查询参数
- PostgreSql查询参数数据类型错误
- 使用c++ . net MySQL连接器的参数化查询不返回结果
- 我可以在跟踪之前查询ltng是否要跟踪具有给定参数的给定跟踪点
- 如何使用C++ADO将GUID用作ADO查询参数
- 通过libcouchbase-cxx发出准备好的/参数化的查询