base.pxd 800 B

1234567891011121314151617181920212223242526272829
  1. cimport lakesuperior.cy_include.cytpl as tpl
  2. ctypedef tpl.tpl_bin Buffer
  3. # NOTE This may change in the future, e.g. if a different key size is to
  4. # be forced.
  5. ctypedef size_t Key
  6. ctypedef Key DoubleKey[2]
  7. ctypedef Key TripleKey[3]
  8. ctypedef Key QuadKey[4]
  9. cdef enum:
  10. KLEN = sizeof(Key)
  11. DBL_KLEN = 2 * sizeof(Key)
  12. TRP_KLEN = 3 * sizeof(Key)
  13. QUAD_KLEN = 4 * sizeof(Key)
  14. # "NULL" key, a value that is never user-provided. Used to mark special
  15. # values (e.g. deleted records).
  16. NULL_KEY = 0
  17. # Value of first key inserted in an empty term database.
  18. FIRST_KEY = 1
  19. cdef bytes buffer_dump(Buffer* buf)
  20. # "NULL" triple, a value that is never user-provided. Used to mark special
  21. # values (e.g. deleted records).
  22. cdef TripleKey NULL_TRP = [NULL_KEY, NULL_KEY, NULL_KEY]