Download the PHP package sweetrdf/in-memory-store-sqlite without Composer
On this page you can find all versions of the php package sweetrdf/in-memory-store-sqlite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sweetrdf/in-memory-store-sqlite
More information about sweetrdf/in-memory-store-sqlite
Files in sweetrdf/in-memory-store-sqlite
Package in-memory-store-sqlite
Short Description RDF in-memory quad store implementation using PDO and SQLite.
License GPL-2.0
Homepage https://github.com/sweetrdf/in-memory-store-sqlite
Informations about the package in-memory-store-sqlite
RDF In-Memory Quad Store
Proof-of-concept RDF in-memory quad store implementation using PDO and SQLite.
Installation
To install this library use Composer via:
composer require sweetrdf/in-memory-store-sqlite
Usage
Use InMemoryStoreSqlite::createInstance()
to get a ready-to-use store instance (see example below).
Sending SPARQL queries can be done via query
method.
Your data is stored inside an in-memory SQLite database file.
After the script ends all your data inside the store will be gone.
Examples
Example 1 (First steps)
Create a store instance, load a few triples into it and run a query.
SPARQL support
Store supports a lot of SPARQL 1.0/1.1 features. For more information please read SPARQL-support.md.
Performance
Store uses an in-memory SQLite file configured with:
PRAGMA synchronous = OFF
PRAGMA journal_mode = OFF
PRAGMA locking_mode = EXCLUSIVE
PRAGMA page_size = 4096
Check PDOSQLiteAdapter.php for more information.
When adding several hundred or more triples at once you may experience increased execution time. Local tests showed that per second around 1500 triples can be added.
License
This work is licensed under the terms of the GPL 2.
Acknowledgement
This work is based on the code of ARC2 from https://github.com/semsol/arc2 (by Benjamin Nowak and contributors). To see what was extracted check pull request #1. ARC2 is dual licensed under the terms of GPL 2 (or later) as well as W3C Software License.