compat.sqlite3
#includeSQLite — self-contained SQL database engine (C amalgamation)
#include <sqlite3.h>
mcpp add compat.sqlite3@3.45.3
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// Behavioral test for compat.sqlite3 (SQLite 3.45.3, C API): assert the
// resolved library version, then open an in-memory database, create a table,
// insert a row, and read it back through both sqlite3_exec and a prepared
// statement.
#include <sqlite3.h>
#include <cassert>
#include <cstring>
int main() {
// The index pins 3.45.3; prove the resolved package is that version.
assert(std::strcmp(sqlite3_libversion(), "3.45.3") == 0);
sqlite3* db = nullptr;
assert(sqlite3_open(":memory:", &db) == SQLITE_OK);
assert(db != nullptr);
// DDL + DML through the convenience API.
char* errmsg = nullptr;
int rc = sqlite3_exec(db,
"CREATE TABLE t(id INTEGER PRIMARY KEY, name TEXT NOT NULL);"
"INSERT INTO t(name) VALUES ('mcpp');",
nullptr, nullptr, &errmsg);
// …
tests/examples/sqlite3/tests/sqlite3_test.cpp · 專案 tests/examples/sqlite3
openkal
| 目標 | 結果 | 環境 | 測試專案 | 首條診斷 |
|---|---|---|---|---|
| x86_64-linux-gnu | runs | posix | sqlite3 | |
| x86_64-windows-musl | runs | posix | sqlite3 |
測量方式
2026-09-23 由 tests/openkal/compat.py 測得,使用 openkal-llvm-runtime 0.15.1、llvm@22.1.8、mcpp 2026.9.21.3。測試專案沒有自行選擇平台相依。 上方徽章是所有已測目標裡最嚴格那個的結果 —— 上表列出每個目標各自的環境。
建置
- targets
sqlite3 (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*
原始檔 (1)
*/sqlite3.c
版本
| 版本 | 平台 | 鏡像 | sha256 |
|---|---|---|---|
3.45.3 最新 |
LinuxWindowsmacOS | 來源 | ea170e73e447… |