Conversation
`c_str()` expresses the intent better than `data()`
Note: C++ reflection-based approach isn't implemented yet.
* Removed `serializer_context_builder`, which is now entirely replaced by `obtain_db_objects()`. * Renamed serializer context flag variables.
* Factored out common functionality into common base classes and mixins. * Renamed structures. * Split CTE table class into its own structure, effectively decoupling it from a table DBO.
It is better to include configuration header files of third-party libraries (including SQLite) in the library's configuration header than in the umbrella header.
clang/gcc use an intrinsic compiler builtin [`__builtin_offsetof`], which doesn't work the way we need.
sqlite_orm's policy is to provide an API without external dependencies (even if implicit).
Open
2fa0827 to
1285ce1
Compare
fnc12
reviewed
May 2, 2026
| } | ||
|
|
||
| /** | ||
| * [Deprecation notice] This expression factory function is deprecated and will be removed in v1.11. |
Owner
There was a problem hiding this comment.
no need to deprecate it cause it is also used in window funcs and it is not going to be deprecated there. So I'd remove [Deprecation notice]
Collaborator
Author
There was a problem hiding this comment.
order_by(rank()) can only be used with FTS not with Window functions, that's why I added it here (actually moved from the rank() factory).
| data_t objectNames; | ||
| std::stringstream ss; | ||
| ss << "SELECT name FROM sqlite_master WHERE type=" << quote_string_literal(std::string(type)); | ||
| ss << "SELECT name FROM sqlite_master WHERE type=" << quote_string_literal(std::string(type)) << std::flush; |
Owner
There was a problem hiding this comment.
nit: we can make it more thiner in memory consumption: declare std::stringstream inside sub-scope/lambda which returns string and pass string while std::stringstream is already destroyed
Collaborator
Author
There was a problem hiding this comment.
Yes, but then the function needs an additional std::string variable, whose size is an additional 40 bytes (with msvc).
| cout << endl; | ||
|
|
||
| cout << "Example completed successfully!" << endl; | ||
| } catch (const std::system_error& e) { |
1285ce1 to
3580f15
Compare
3580f15 to
1ced217
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Views in SQL are virtual tables based on the result-set of a SELECT statement, also known as query views.
With sqlite_orm, query views are defined using make_view() which leverages C++ reflection to automatically map columns from the SELECT statement to struct fields and to specify the query view's name with a class-scope annotation.
SQL views created with make_view() don't require explicit column definitions - the columns are automatically determined from the view's object type through reflection.
Resolves the following discussions and tickets:
Note: There are no tests executed yet as no github action platform (Linux Ubuntu) provides gcc-16 binaries. However I tested the "view" example and unit tests in a local Windows Subsystem for Linux (WSL) environment.