Repository navigation
Version 2.0.2
[Summary]
StormByte Database is the C++26 SQL layer of the StormByte suite.
One API covers SQLite, PostgreSQL, MariaDB and Microsoft SQL Server (MSSQL).
Backends are base classes: you derive your schema, prepare statements and hook connect there.
This repository is not Base, Buffer, Config, Crypto, Logger, Multimedia, Network or System.
It requires StormByte Base 2.1.0 and StormByte-Logger 2.0.2.
The original StormByte-Database source is dual-licensed under LGPL v3.0-or-later or a commercial license.
If you landed here from a release link and have not read the tree:
- What this module is, how to build it, and short examples: README.md
- License: dual LGPL v3.0-or-later / commercial, LICENSE and COPYING.LGPLv3
Added
- Release workflow. The archive name is
StormByte-Database-<tag>-<os>-<arch>[-stdlib].zip. The build compiles SQLite, PostgreSQL, MariaDB and the MSSQL client, and starts PostgreSQL and MariaDB before the build so PGO training can run those tests. On Linux the MSSQL container is started as well. macOS and Windows have no SQL Server during a tag build, so that test skips. THIRD-PARTY(hyphenated:THIRDPARTYis the same path as thethirdparty/directory on Windows and macOS) plusCOPYING.SQLite,COPYING.PostgreSQL,COPYING.MariaDB,COPYING.FreeTDSandCOPYING.OpenSSL. The MSSQL objects are FreeTDS DB-Library,tds,replacementsandtdsutilsonly, under the GNU Library General Public License v2 or later. The FreeTDS server, ODBC driver, CT-Library and tools are not compiled in. OpenSSL 3.5.9 is compiled in because those clients link it.ENABLE_LTOandENABLE_PGO. CI keeps the compiler and dependency matrix, turns LTO on and runs the tests. Profile-guided optimization, and the documentation, stay on the release workflow.
Fixed
InstalledConsumerSmokealso searches the directory of a systemStormByte-Logger.WITH_STORMBYTE=SYSTEMdoes not copy that library into the BuildMaster prefix, so the smoke test failed configure withCould not find LOGGER_LIBRARYand aborted PGO.-stdlib=libc++and-stdlib=libstdc++do not count as custom C++ flags. If either is the only extra flag, Release still gets-O2and the CPU baseline.- Bundled MariaDB Connector C no longer builds
mariadb_config.WITH_UNIT_TESTS=OFFalready skips the connector test suite, andWITH_TOOLSis off, but the helper executable is unconditional on Unix. Itsmainshares a name with the test programs in the merged Clang profile, so-fprofile-usereports a control-flow hash mismatch and the connector's-Werroraborts the build. The library does not use that executable. - MSVC PGO no longer puts
/LTCG:PGINSTRUMENTor/LTCG:PGOPTIMIZEinCMAKE_EXE_LINKER_FLAGS. Those flags areadd_link_optionson this project. A nestedproject()inherits the cache and its compiler test linkscmTC_*.exe, which was never instrumented, so/LTCG:PGOPTIMIZEaborted with LNK1266 (cmTC_*.pgdmissing). The cache keeps a bare/LTCGso those/GLobjects still link. A static dependency stays LTCG and is optimized by the link that owns the.pgd. - Bundled PostgreSQL on Windows is built without LTO. MSVC LTCG left
postgres.libwithout the backend exports, solibpqwalreceiver.dllfailed to link (ResetLatch,ProcessInterruptsand the rest). The client archives are still static. - Clang PGO drops
.profrawfiles left by compiler probes before ctest, andllvm-profdata mergeuses-failure-mode=all. A probe writes a few hundred bytes formain, with a padded empty symbol name. The default failure mode isany, so that one file aborted the merge even after the instrumented tests had passed. PostgressendsporttoPQconnectdbParams. The connection used to omit it, so libpq used 5432 orPGPORTinstead of the port this object was given. The constructor takes the port after the logger and defaults to 5432. Callers that do not pass it stay source-compatible.
Changed
- CI builds with
ENABLE_LTO=ON,ENABLE_PGO=OFFandENABLE_TEST=ON, then runs ctest. Profile-guided optimization stays on the release workflow. - Breaking: Database exceptions no longer call
std::format. Literal{}is replaced bySafe::String::ReplaceToken, the same way Base, Config and Logger do it.what()paths are unchanged (StormByte.Database.Connection,StormByte.Database.Query.Execute, and the rest). Copy, move and each destructor stay in this module. - StormByte Base 2.1.0 and StormByte-Logger 2.0.2 are downloaded release archives (
BACKEND=binary). The Logger source tree is no longer a submodule. BuildMaster 2.1.0 is required.optimizations.cmakematches the other modules: Linuxx86-64-v3, Appleapple-m1, Windows/O2 /arch:AVX2. No/fp:fast. - Postgres and MariaDB tests read the account from the environment.
POSTGRES_USER,POSTGRES_PASSWORDandPOSTGRES_PORTdefault totestuser,testpassand5432.MARIADB_USER,MARIADB_PASSWORDandMARIADB_PORTdefault totestuser,testpassand3306. The host and the database name staylocalhostor127.0.0.1, andstormbyte_test.