Small SQL storage, this project is for learning purposes only
run make
to build
The end-2-end testing is done with Ruby's Rspec. The Unit tests are done with C.
You can find the tests in /tests
run sudo make install
to install
The idea is to build a working (but simple) relational database that can have SQL queries ran against it. Another goal of mine is to learn how to build and grow a C codebase.
- Development code goes into the
src
folder. Thesrc
folder is for the actual source code and the libs/headers are described below. - Test code goes into the
tests
folder. There is atests/includes
folder that has some testing tools for the unit tests. Thetests/unit
houses the unit test.c
files starting with the wordTest
. These test files all compile into their own binary and are ran when you runmake test
. Thetests/e2e
folder has Ruby rspec end-to-end tests. These run the binaries that are built to thebin
folder and make assertions based on the behavior of those binaries. - Library files like project headers aswell as any 3rd party headers that might need to be added go into the
include
folder. - Build code goes into the
build
folder. This is where any temporary build files are housed and is deleted when you runmake clean
. - Binary output files go into the
bin
folder. This is where any final binaries build to. - Documentation goes in the
docs
folder. This includes any build notes, dev notes, etc. This is also where the API and usage documentation will live.
With Ruby rspec, the behavior of the built binary files will be tested by running the binary with given input and asserting against the output.
For unit tests, I will write simple C tests and helper macros. The goal is for these tests to be as light as possible (the idea is the compiler + rspec should catch most bugs) and to really only test 2 things:
- Utility functions (math functions, abstractions, formatters, etc.)
- Exposed C API (final high-level API to interact with SQLTiny)