store.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. #ifndef _LSUP_STORE_H
  2. #define _LSUP_STORE_H
  3. /*
  4. * Store feature flags.
  5. *
  6. * NOTE: LSUP_STORE_PERM need only be set by an implementation based on whether
  7. * its path is on a default temporary dir (e.g. LSUP_MDB_RAMDISK_PATH). If this
  8. * flag is not set, it means the data will be cleared before the next execution
  9. * of the program. However, its being set does not guarantee the persistence of
  10. * the medium (i.e. a "permanent" store may have been created ad hoc on a
  11. * tempfs).
  12. */
  13. #define LSUP_STORE_PERM 1<<0 // Store is on a permanent location.
  14. #define LSUP_STORE_CTX 1<<1 // Store supports contexts (quads).
  15. #define LSUP_STORE_IDX 1<<2 // Store is fully SPO(C)-indexed.
  16. #define LSUP_STORE_TXN 1<<3 // Supports manual transaction handling.
  17. #define LSUP_STORE_NET 1<<4 // Store is over a network protocol.
  18. /* * * CALLBACKS * * */
  19. uint64_t key_hash_fn (
  20. const void *item, uint64_t seed0, uint64_t seed1)
  21. { return (uint64_t) item; }
  22. int key_cmp_fn (const void *a, const void *b, void *udata)
  23. { return (LSUP_Key) a - (LSUP_Key) b; }
  24. #endif /* _LSUP_STORE_H */