curiosity-ai / rocksdb-sharp

.net bindings for the rocksdb by facebook
BSD 2-Clause "Simplified" License
155 stars 38 forks source link

can add new Put overloads Api ,the Key is string and value is byte[] pr Span ? #35

Closed sgf closed 9 months ago

sgf commented 1 year ago

can add new Put overloads Api ,the Key is string and value is byte[] or Span ?

theolivenbaum commented 9 months ago

@sgf you can add your own operators as extension methods to the RocksDb class

public static class RocksDbExt
{
    public static void Put(this RocksDb db, string key, byte[] bytes)
    {
        //call db.Put(...) after converting the key to bytes
    }
}