Repository navigation
Add table-name accessors for result columns - #594
Conversation
|
Hello, thanks for your contribution. It looks nice and clean, congrats! I found a slightly related bug in the Meson build, so I created (and now merge) the PR #595 to fix Meson column metadata propagation Now, it would be nice if you could:
|
Expose the source table through the existing column metadata API so callers need not prepare another statement or access a raw handle. Fixes SRombauts#555
c9bddfa to
94300b1
Compare
|
Rebased onto d43b758, including #595, and extended the public Meson consumer test to check that both new accessors return "test". The library, examples, unit tests and consumer pass locally with system SQLite/shared, bundled SQLite/shared, bundled SQLite/static, and bundled SQLite/static with metadata disabled. The system SQLite lane used fallback GTest because system GTest is unavailable here. Changelog remains the final separate commit. |
|
Thanks a lot, that's a nice one I had intended to implement! (but found other problems in the way, that I fixed instead) |
|
Is this feature will be integrate to 3.5.0 (in C++ 11 compatibility?) |
|
Hey @Feneck91, why not, if this is something that you would like I can see how much work it is! |
Add the Statement and Column APIs from #594 to the 3.4.x maintenance line, including metadata lifetime and reprepare tests.
Add the Statement and Column APIs from #594 without requiring C++17 or newer SQLite functionality. Cover expressions, joins, invalid indexes, and retained columns in unit and Meson tests.
Backport `Statement::getColumnTableName()` and `Column::getTableName()` from #594 to the C++11 maintenance branch (fixes #555 for the 3.x line). Both remain guarded by `SQLITE_ENABLE_COLUMN_METADATA`. Add unit tests and extend the Meson consumer test introduced by #600. No #598 reprepare-cache fix, new SQLite API requirement, or reprepare-specific regression test. CI validation is pending.
Fixes #555. Add
Statement::getColumnTableName()andColumn::getTableName()underSQLITE_ENABLE_COLUMN_METADATA, so callers can retrieve the source table without preparing another statement. The API preserves SQLite's null and pointer-lifetime semantics.Validation: 72 tests pass with CMake/GCC, CMake/Clang ASan+UBSan, and Meson with metadata enabled; 69 pass with metadata disabled. CMake examples and an independent consumer also pass. After rebasing onto #595, the public Meson consumer checks both table-name APIs; system/shared and bundled/shared/static configurations pass, as does bundled/static with metadata disabled. The project-settings lint findings match the baseline; Windows/macOS and Doxygen were not run.
Prepared and validated with OpenAI Codex. The changelog is in a separate final commit, as requested by the contribution workflow.