File tree Expand file tree Collapse file tree 1 file changed +73
-0
lines changed
Expand file tree Collapse file tree 1 file changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ # Sql2CppHeader
2+
3+ A C++ application that uses Boost.Spirit X3 to parse SQL files and extract table definitions, then generates corresponding C++ header files.
4+
5+ ## Features
6+
7+ - Parses SQL files to extract table definitions.
8+ - Generates C++ header files based on parsed table definitions.
9+
10+ ## Prerequisites
11+
12+ - CMake 3.28 or higher
13+ - Boost 1.84 (tested with this version only)
14+
15+ ## Installation
16+
17+ 1 . ** Clone the repository:**
18+
19+ ``` sh
20+ git clone https://github.com/cyberium/Sql2CppHeader.git
21+ cd Sql2CppHeader
22+ ```
23+
24+ 2. ** Set up Boost:**
25+
26+ - Ensure the ` BOOST_ROOT` environment variable points to your Boost 1.84 installation directory.
27+
28+ # # Building the Project
29+
30+ 1. ** Run CMake and build:**
31+
32+ ` ` ` sh
33+ cmake -H. -Bbuild
34+ cmake --build build --config Release
35+ ` ` `
36+
37+ # # Usage
38+
39+ Run the application with the input SQL file and the desired output header file:
40+
41+ ` ` ` sh
42+ ./build/src/parser/Release/Sql2CppHeader -i < input_sql_file> -o < output_header_file>
43+ ` ` `
44+
45+ Example:
46+
47+ ` ` ` sh
48+ ./build/src/parser/Release/Sql2CppHeader input.sql output.h
49+ ` ` `
50+
51+ # ## Command-Line Options
52+
53+ - ` -i, --input < file> ` : Specify the input SQL file.
54+ - ` -o, --output < file> ` : Specify the output header file.
55+ - ` -v, --verbose` : Enable verbose output.
56+ - ` -h, --help` : Show help message.
57+
58+ # # Running Tests
59+
60+ ** Command to use:**
61+
62+ ` ` ` sh
63+ ctest -C Release --output-on-failure --test-dir build
64+ ` ` `
65+
66+ # # Libraries Used
67+
68+ - ** Boost.Test** : Used for unit testing the application.
69+ - ** Boost.Spirit X3** : Used for parsing SQL files.
70+
71+ # # License
72+
73+ This project is licensed under the MIT License.
You can’t perform that action at this time.
0 commit comments