A modern and easy to use SQL query building in C++
Find a file
2025-11-25 19:12:41 +01:00
assets/logo Moving to old logo 2025-11-09 20:01:20 +01:00
backup working on pretty template in query 2024-01-06 16:48:50 +01:00
book [✏️] Updating documentation 2024-08-02 20:34:00 +02:00
cmake Adding target file for FetchContent 2024-02-11 14:14:33 +01:00
contribution [🔨] Adding nesting 2024-07-11 12:05:43 +02:00
include/querycpp Adding license text to all files and SPDX lincense identifier 2025-07-06 12:42:45 +02:00
integration_test Moving integration test to have seperate CMakeLists.txt files 2025-11-25 19:00:17 +01:00
scripts Adding CMakeList.txt files for each test 2025-11-21 20:03:11 +01:00
test Adding CMakeList.txt files for each test 2025-11-21 20:03:11 +01:00
versions [✏️] Updating Change log 2025-03-30 20:12:42 +02:00
.clang-format #45: Adding clang format file and local git commit hook 2022-07-26 20:52:19 +02:00
.gitignore [🔨] Adding documentation and updating gitignore file 2024-09-05 21:30:55 +02:00
.gitlab-ci.yml updating tes step in ci 2024-01-31 19:19:48 +01:00
CHANGELOG.md Adding a new simple logo 2025-11-09 14:03:03 +01:00
CMakeLists.txt Moving integration test to have seperate CMakeLists.txt files 2025-11-25 19:00:17 +01:00
docker-compose.yml update 2023-04-17 19:45:14 +02:00
Dockerfile [🔨] Adding SQLITE3 Integration test and making PostgreSQL clean 2024-04-29 21:14:51 +02:00
Doxyfile [🔨] Starting doxygen string 2024-09-02 21:52:29 +02:00
LICENSE Adding license text to all files and SPDX lincense identifier 2025-07-06 12:42:45 +02:00
querycpp.pc.in Adding pkg-config file for easier user on some systems 2025-11-24 10:04:05 +01:00
README.md Moving integration test to have seperate CMakeLists.txt files 2025-11-25 19:00:17 +01:00

logo

QueryC++ (?++) is a modern C++ library for build SQL queries directly in C++ code with the goal of removing raw SQL strings in code.

Building and Installation

Whilst QueryC++ is a header only library. We do provided a way to install it using CMake. Furthermore we also use CMake to build our unit and integration tests.

To install queryc++ follow these steps:

mkdir build
cd build
cmake ..
make
sudo make install

The make install must be done with sudo on most systems.

Mac issue and script solution

Some see issues on macOS due to how macOS setup the system. For people using clang installed using homebrew

To solve this we have the build_mac.sh script in the scripts folder. You can add any CMake options needed after the. so sh scripts/build_mac.sh <OPTION>. It can take 0 or more arguments.

Build and run unit tests

We do not build the unit tests by default. To do this you will need to add -DBUILD_TEST=1 to your CMake command

To run all unit tests run make test after the make command that builds the tests.

Build with integration tests

We do not build the unit tests by default. To do this you will need to add BUILD_INTEGRATION_TEST=1 to your CMake command

Currently we have integration tests for:

  • sqlite
  • PostgreSQL

Each integration test gets a sub folder, see below, that contains a integration test binary. You can use these to run the integration test

integration_test
├── postgres
│   └── pqqxx_integration_test
└── sqlite
    └── sqlite_integration_test

Export compile commands

Add -DCMAKE_EXPORT_COMPILE_COMMANDS=ON