fix copy-paste error that caused -DDEBUG build to fail
[librdf.sqlite.git] / README.md
blob8fd2189389374fc8c80c51e6dcbbe39df2a26568
2 [![Build Status](https://travis-ci.org/mro/librdf.sqlite.svg)](https://travis-ci.org/mro/librdf.sqlite)
4 Improved [SQLite](http://sqlite.org) RDF triple [storage module](http://librdf.org/docs/api/redland-storage-modules.html)
5 for [librdf](http://librdf.org/).
7 Cross platform, plain C source file. Comes with a [![Version](https://img.shields.io/cocoapods/v/librdf.sqlite.svg)](https://github.com/CocoaPods/Specs/tree/master/Specs/librdf.sqlite/) for those targeting iOS.
9 Inspired by the [official sqlite store](https://github.com/dajobe/librdf/blob/master/src/rdf_storage_sqlite.c).
11 ## Usage
13 ```c
14 #include "rdf_storage_sqlite_mro.h"
15 ....
16 librdf_world *world = librdf_new_world();
17 librdf_init_storage_sqlite_mro(world);  // register storage factory
18 ....
19 const char* options = "new='yes', contexts='no'";
20 librdf_storage *newStorage = librdf_new_storage(world, LIBRDF_STORAGE_SQLITE_MRO, file_path, options);
21 ```
23 See e.g. in (my) <http://purl.mro.name/ios/librdf.objc>.
25 ## License
27 - `test/minunit.h`, Copyright (C) 2002 [John Brewer](http://jera.com), NO WARRANTY,
28 - *all others*, Copyright (C) 2014-2015 [Marcus Rohrmoser mobile Software](http://mro.name/~me), [Human Rights License](LICENSE)
30 ## Design Goals
32 | Quality         | very good | good | normal | irrelevant |
33 |-----------------|:---------:|:----:|:------:|:----------:|
34 | Functionality   |           |      |    ×   |            |
35 | Reliability     |           |  ×   |        |            |
36 | Usability       |           |      |        |     ×      |
37 | Efficiency      |     ×     |      |        |            |
38 | Changeability   |           |  ×   |        |            |
39 | Portability     |           |      |    ×   |            |
41 Currently 50% code and 99% runtime saving (for 100k triples).
43 - intense use of [SQLite prepared statements](https://www.sqlite.org/c3ref/stmt.html) and
44   [bound values](https://www.sqlite.org/c3ref/bind_blob.html):
45   - no stringbuffers
46   - no strcpy/memcpy,
47   - no SQL escaping,
48 - re-use compiled statements where possible (at the cost of thread safety),
49 - as few SQL statements as possible (at the cost of some non-trivial ones),
50 - SQLite indexes (at the cost of larger DB files).