Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yet another code quality PR #1337

Merged
merged 15 commits into from
Jul 22, 2024
Merged

Yet another code quality PR #1337

merged 15 commits into from
Jul 22, 2024

Conversation

trueqbit
Copy link
Collaborator

  • Added missing includes, which helps in trimming down the header/json file used to produce the amalgamated header file.
  • Added missing includes of standard headers.
  • Added some includes to examples and unit tests that are relevant if sqlite_orm is to be consumed as a named module.
  • Removed inclusion of cxx_universal.h. Its purpose is to provide symbols that sqlite_orm depends on everywhere and, more importantly, there are decision macros that are used before the actual code starts in certain header files, which is the reason that cxx_universal.h is included upfront by the files used for amalgamation.
  • Qualified basic standard types (e.g. std::time) are used in the examples, which means that in future the examples will only depend on the std module.
  • Trimmed down the header/json file used to produce the amalgamated header file.
  • Added more "storage" unit tests [last rowid, raw insert using a CTE].
  • Updated vcpkg environment to 2024.07.12 on appveyor

* Added missing includes of dependent internal headers
* Cleaned up amalgamation files to only include the public facing high-level headers
* last insert rowid
* With insert
* moved "With select" to storage_tests.cpp
When importing sqlite_orm as a named module, sqlite3 symbols are not exported.
The `cxx_universal.h` exists to provide symbols that sqlite_orm depends on everywhere.
It is easy to forget to include it. And more importantly there are decision macros used that need to be defined before certain files anyway, which is the reason that `cxx_universal.h` gets included by the files used for amalgamation.
Hence I decided to not include it anymore.
@trueqbit trueqbit requested a review from fnc12 July 21, 2024 07:13
examples/blob_binding.cpp Show resolved Hide resolved
examples/iteration.cpp Show resolved Hide resolved
@trueqbit trueqbit merged commit 8c15e4b into dev Jul 22, 2024
4 checks passed
@trueqbit trueqbit deleted the code-quality branch July 22, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants