*This is a simplified key-value database.
MyJQL is a simplified redis-like key-value database, which supports three kinds of operations: get key, set key value, and del key. B-Tree index is automatically created for key.
includeandsrc: Core implementation of MyJQL.driver: Header and source for MyJQL driver. After compilation, you can include myjqlclient.h and link myjqlclient.lib (in Windows) or libmyjqlclient.a (in Linux). In this way, your own program will be able to store data to and retrieve data from MyJQL.main:myjqlserver.cis the server.myjqlshell.cppis the client, which also serves as an example utilizing the driver.test: Tests for core implementation.test_myjql.cppis used to examine the full functionality.
MyJQL supports Windows and Linux (Ubuntu).
Shell/CMD/PowerShell (in the root directory of this repo):
mkdir build
cd build
cmake ..
cmake --build .
MSVC:
cmake --build . --config Release
gcc:
cmake .. -DCMAKE_BUILD_TYPE=Release
Change directory into build/test (if you are currently in build):
cd test
List tests:
ctest -N
Run tests:
-
MSVC:
ctest -C Debug ctest -C Release -
gcc:
ctest
- Start the server:
myjqlserver. - Start several clients:
myjqlshell. - Input commands to the clients:
set key value: setkeytovalue.get key: get value based onkey.del key: delete value based onkey.exit: exit the client shell.
- To safely stop the server:
- Use
ctrl + cin Windows and Linux. - In Windows, you also can close it directly.
- Use