The interface implemented by applications to provide custom ordering of records. More...
Public Attributes | |
int(* | compare )(WT_COLLATOR *collator, WT_SESSION *session, const WT_ITEM *key1, const WT_ITEM *key2, int *cmp) |
Callback to compare keys. More... | |
int(* | terminate )(WT_COLLATOR *collator, WT_SESSION *session) |
If non-NULL, a callback performed when the database is closed. More... | |
The interface implemented by applications to provide custom ordering of records.
Applications register their implementation with WiredTiger by calling WT_CONNECTION::add_collator.
int(* WT_COLLATOR::compare)(WT_COLLATOR *collator, WT_SESSION *session, const WT_ITEM *key1, const WT_ITEM *key2, int *cmp) |
Callback to compare keys.
[out] | cmp | set to -1 if key1 < key2 , 0 if key1 == key2 , 1 if key1 > key2 . |
int(* WT_COLLATOR::terminate)(WT_COLLATOR *collator, WT_SESSION *session) |
If non-NULL, a callback performed when the database is closed.
The WT_COLLATOR::terminate callback is intended to allow cleanup, the handle will not be subsequently accessed by WiredTiger.