2009-07-29 21:04:08 +00:00
|
|
|
/*
|
|
|
|
* bTree.h
|
|
|
|
*
|
|
|
|
* Created on: Jul 29, 2009
|
|
|
|
* Author: sears
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BTREE_H_
|
|
|
|
#define BTREE_H_
|
|
|
|
|
2009-08-22 00:01:02 +00:00
|
|
|
#include <stasis/operations.h>
|
2009-07-29 21:04:08 +00:00
|
|
|
|
2013-02-09 02:51:38 +00:00
|
|
|
BEGIN_C_DECLS
|
|
|
|
|
2009-07-29 21:04:08 +00:00
|
|
|
typedef int(*stasis_comparator_t)(const void*, size_t, const void*, size_t, void*);
|
|
|
|
typedef int16_t stasis_comparator_id_t;
|
|
|
|
|
2011-04-26 04:16:07 +00:00
|
|
|
void BtreeDeinit(void);
|
2009-07-29 21:04:08 +00:00
|
|
|
void BtreeInit();
|
|
|
|
recordid TbtreeCreate(int xid, stasis_comparator_id_t cmp_id);
|
|
|
|
int TbtreeLookup(int xid, recordid rid, void * cmp_arg, byte * key, size_t keySize, byte ** value, size_t* valueSize);
|
|
|
|
int TbtreeInsert(int xid, recordid rid, void *cmp_arg, byte *key, size_t keySize, byte *value, size_t valueSize);
|
|
|
|
|
2013-02-09 02:51:38 +00:00
|
|
|
END_C_DECLS
|
|
|
|
|
2009-07-29 21:04:08 +00:00
|
|
|
#endif /* BTREE_H_ */
|