Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
This is a simple and very lite nosql implement, in order to replace sqlite. nosqlite now supports the following main operations: 1. set - add or replace a record 2. get - find a record 3. remove - remove a record advantages: 1. only 300 lines of ansi c code 2. it consumes very low memory, about 10MB for 1000000 records 3. more better performance than sqlite, about 400000 qps compile and run the test case: gcc nosqlite.c test.c -o test ./test compile and run the dict2db, convert dict to db: gcc nosqlite.c dict2db.c -o dict2db ./dict2db sample.dict sample.db compile and run the benchmark: gcc nosqlite.c benchmark.c -o benchmark ./benchmark sample.dict sample.db capacity check-value-or-not introduction in Chinese: http://justcodeit.info/blog/a-simple-nosqlite-implementation.html NOTICE: the max value size is 64KB by default, that's because `NOSQLITE_VINT` is defined as `unsigned short`, if you want to store larger value you should add a compiling argument `-DNOSQLITE_VINT="unsigned int"`, also there's a testcase in `test.c`: gcc -DNOSQLITE_VINT="unsigned int" nosqlite.c test.c -o test ./test