Mercurial > core / lisp/ffi/rocksdb/comparator.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
fea71448569b
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 ;;; rocksdb/comparator.lisp --- RocksDB Comparators 3 ;; RocksDB Lisp Comparator API 7 ;; ref: https://github.com/facebook/rocksdb/blob/main/include/rocksdb/comparator.h 9 // Three-way comparison. Returns value: 11 // == 0 iff "a" == "b", 13 // Note that Compare(a, b) also compares timestamp if timestamp size is 14 // non-zero. For the same user key with different timestamps, larger (newer) 15 // timestamp comes first. 20 (define-alien-type rocksdb-compare-function 28 (define-alien-type rocksdb-compare-with-ts-function 36 (define-alien-type rocksdb-compare-without-ts-function 46 (define-alien-routine rocksdb-comparator-create (* rocksdb-comparator) 48 (destructor (* rocksdb-destructor-function)) 49 (compare (* rocksdb-compare-function)) 50 (name (* rocksdb-name-function))) 52 ;; (rocksdb-comparator-create nil nil (make-alien int 1) (make-alien unsigned-char 10)) 54 (define-alien-routine rocksdb-comparator-destroy void (self (* rocksdb-comparator))) 56 (define-alien-routine rocksdb-comparator-with-ts-create (* rocksdb-comparator) 58 (destructor (* rocksdb-destructor-function)) 59 (compare (* rocksdb-compare-function)) 60 (compare-with-ts (* rocksdb-compare-with-ts-function)) 61 (compare-without-ts (* rocksdb-compare-without-ts-function)) 62 (name (* rocksdb-name-function))) 64 (define-alien-callable rocksdb-compare-never-name c-string () (make-alien-string "compare-never")) 66 (define-alien-callable rocksdb-compare-never int 72 (declare (ignore state a alen b blen)) 75 (define-alien-callable rocksdb-compare-never-with-ts int 81 (declare (ignore state a alen b blen)) 84 (define-alien-callable rocksdb-compare-never-without-ts int 92 (declare (ignore state a alen a-ts b blen b-ts))