vedang / clj_fdb

A thin Clojure wrapper for the Java API for FoundationDB.
https://vedang.github.io/clj_fdb/
Eclipse Public License 1.0
25 stars 9 forks source link

Add wrapper functions for com.apple.foundationdb.KeySelector #10

Closed vedang closed 6 years ago

vedang commented 6 years ago

I reviewed the documentation for KeySelector, and here are my initial thoughts:

  1. I'd like a src/clj_fdb/keyselector.clj file which contains simple wrapper functions over com.apple.foundationdb.KeySelector. These should simply take a byte-array key as input and call the underlying Java functions. This is similar to what I've done in src/clj_fdb/transaction.clj
    • first-greater-than
    • first-greater-or-equal
    • last-less-or-equal
    • last-less-than
  2. I'd like equivalents for these same 4 functions in src/clj_fdb/core.clj which accept a k and a keyfn argument and return an instance of KeySelector. The default for keyfn would be bs/to-byte-array.

Please refer to src/clj_fdb/transaction.clj, src/clj_fdb/core.clj and README.md to get a feel for how the library is structured.

This issue duplicates #7

Javadocs for Reference

vedang commented 6 years ago

Closed by #19