store_mdb.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /** @file store_mdb.h
  2. *
  3. * @brief LMDB graph store backend.
  4. *
  5. * This module stores triples in a LMDB embedded store, organized
  6. * into named graphs. The store is optimized and indexed for fast lookup of any
  7. * number of bound terms.
  8. *
  9. * The store must be first initialized once, to create the environment files
  10. * and folders as well as the internal databases, then it must be opened once
  11. * per session. Within that session multiple R/W operations can be performed
  12. * using transactions.
  13. *
  14. * Note that, even though the terms "graph", "context", etc. are used, no code
  15. * in this module checks for valid RDF data. In theory any term can be any
  16. * binary data. This allows using the store for non-RDF graph data.
  17. *
  18. * TODO more doc
  19. */
  20. #ifndef _LSUP_STORE_MDB_H
  21. #define _LSUP_STORE_MDB_H
  22. #include "lmdb.h"
  23. #include "buffer.h"
  24. #include "store_interface.h"
  25. // FIXME find a better cross-platform path.
  26. /// Default MDB store identifier and location.
  27. #define LSUP_MDB_STORE_URN "file://" TMPDIR "/mdb_store"
  28. /// MDB store interface.
  29. extern const LSUP_StoreInt mdbstore_int;
  30. #endif /* _LSUP_STORE_MDB_H */