compat.soci
#includeSOCI — a C++ database access library with one API over many engines
#include <soci/soci.h>
mcpp add compat.soci@4.1.4
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// Behavioral test: a real SQLite session driven through SOCI.
//
// SOCI is a thin layer over a backend, so a test that opens no session proves
// almost nothing. Every interesting way this package can be wrong — the backend
// TUs not compiled, the missing upstream git submodule not replaced by the
// compat.sqlite3 edge, the private SOCI_SQLITE3_SOURCE switch mismatched, a
// stale generated soci-config.h — shows up only once a statement runs. So every
// assertion below goes through soci::session against `:memory:`, and four of
// them are chosen to be unfakeable:
//
// * SOCI_VERSION is asserted EXACTLY: it identifies the pinned upstream
// release, the same way tests/examples/sqlite3 asserts sqlite3_libversion().
// * `select sqlite_version()` must return a real SQLite version: the
// amalgamation can only have come from the compat.sqlite3 dependency, since
// upstream's own copy is a git submodule the source tarball omits.
// * the error paths must produce a sqlite3_soci_error carrying the backend's
// own backend name, error code and error CATEGORY — a real backend raising
// real errors, not a stub.
// * NULL round-tripping is asserted through soci::indicator, which is SOCI's
// own layer (the backend reports the column type, the core maps it).
//
// The backend is reached as a FACTORY OBJECT (soci::sqlite3) rather than through
// …
tests/examples/soci/tests/soci_test.cpp · 项目 tests/examples/soci
构建
- targets
soci (lib)- language
c++23- import std
- no
- include dirs
*/include, */include/private, mcpp_generated/include
源文件 (2)
*/src/core/*.cpp*/src/backends/sqlite3/*.cpp
生成的文件
mcpp_generated/include/mcpp_soci_defines.hmcpp_generated/include/soci/soci-config.h
版本
| 版本 | 平台 | 镜像 | sha256 |
|---|---|---|---|
4.1.4 最新 |
LinuxWindowsmacOS | 源站 | 144f017cccc2… |