@@ -23,6 +23,16 @@ Together, reflect-cpp and sqlgen enable reliable and efficient ETL pipelines.
2323- 🔌 ** Multiple Backends** : Support for PostgreSQL and SQLite
2424- 🔍 ** Reflection Integration** : Seamless integration with [ reflect-cpp] ( https://github.com/getml/reflect-cpp )
2525
26+ ## Supported databases
27+
28+ The following table lists the databases currently supported by sqlgen and the underlying libraries used:
29+
30+ | Database | Library | Version | License | Remarks |
31+ | ---------------| --------------------------------------------------------------------------| --------------| ---------------| -----------------------------------------------------|
32+ | MySQL/MariaDB | [ libmariadb] ( https://github.com/mariadb-corporation/mariadb-connector-c ) | >= 3.4.5 | LGPL | |
33+ | PostgreSQL | [ libpq] ( https://github.com/postgres/postgres ) | >= 16.4 | PostgreSQL | Will work for all libpq-compatible databases |
34+ | sqlite | [ sqlite] ( https://sqlite.org/index.html ) | >= 3.49.1 | Public Domain | |
35+
2636## Quick Start
2737
2838### Installation using vcpkg
@@ -47,6 +57,14 @@ cmake --build build -j 4 # gcc, clang
4757cmake --build build --config Release -j 4 # MSVC
4858```
4959
60+ This will build the static library. To build the shared library
61+ add ` -DBUILD_SHARED_LIBS=ON -DVCPKG_TARGET_TRIPLET=... ` to the first line.
62+ Run ` ./vcpkg/vcpkg help triplets ` to view all supported triplets.
63+ Common triplets for shared libraries are ` x64-linux-dynamic ` ,
64+ ` arm64-osx-dynamic ` or ` x64-osx-dynamic ` .
65+
66+ Add ` -DSQLGEN_BUILD_MYSQL=ON ` to support MySQL/MariaDB.
67+
50684 . Include in your CMake project:
5169``` cmake
5270find_package(sqlgen REQUIRED)
@@ -70,6 +88,17 @@ For older versions of pip, you can also use `pip` instead of `pipx`.
7088conan build . --build=missing -s compiler.cppstd=gnu20
7189```
7290
91+ This will build the static library. To build the shared library,
92+ add ` -o */*:shared=True ` .
93+
94+ Add ` -o sqlgen/*:with_mysql=True ` to support MySQL/MariaDB.
95+
96+ 3 . Include in your CMake project:
97+ ``` cmake
98+ find_package(sqlgen REQUIRED)
99+ target_link_libraries(your_target PRIVATE sqlgen::sqlgen)
100+ ```
101+
73102You can call ` conan inspect . ` to get an overview of the supported options.
74103
75104## Usage Examples
0 commit comments