Skip to content

RocksDB wrapper for Go. Support 9.x, 8.x, 7.x, 6.x, etc

License

Notifications You must be signed in to change notification settings

linxGnu/grocksdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

31065dc · Feb 9, 2022

History

81 Commits
Feb 9, 2022
Feb 3, 2020
Jan 30, 2020
Oct 9, 2019
Nov 11, 2021
Nov 12, 2021
Oct 9, 2019
Oct 14, 2020
Dec 31, 2020
Feb 16, 2021
Feb 9, 2022
Feb 9, 2022
Jul 13, 2021
Jul 13, 2021
Oct 14, 2020
Oct 17, 2020
Oct 17, 2019
Oct 17, 2020
Oct 14, 2020
Dec 21, 2021
Oct 16, 2019
Oct 17, 2020
Oct 14, 2020
Oct 17, 2020
Oct 17, 2019
Feb 9, 2022
Oct 17, 2020
Dec 21, 2021
Oct 14, 2020
Oct 17, 2019
Dec 31, 2020
Dec 31, 2020
Nov 12, 2021
Oct 17, 2020
Oct 14, 2021
Mar 14, 2021
Oct 15, 2019
Oct 15, 2019
Oct 9, 2019
Dec 24, 2021
Nov 11, 2021
Nov 11, 2021
Jul 13, 2021
Oct 9, 2019
May 24, 2021
Oct 14, 2020
Oct 17, 2020
Nov 11, 2021
Nov 12, 2021
Dec 21, 2021
Dec 31, 2020
May 10, 2021
Dec 21, 2021
Apr 3, 2020
Dec 31, 2020
Dec 31, 2020
Oct 14, 2020
Oct 9, 2019
Dec 31, 2020
Oct 15, 2020
Oct 15, 2020
Oct 9, 2019
Dec 24, 2021
May 10, 2021
Oct 15, 2020
Oct 15, 2020
Dec 21, 2021
Oct 17, 2019
Oct 17, 2019
Oct 17, 2020
Oct 17, 2020
Oct 14, 2019
Oct 14, 2019
Oct 17, 2019
Feb 16, 2021
Oct 14, 2020
Oct 17, 2020
Apr 3, 2020
Oct 14, 2020
Nov 11, 2021
Oct 17, 2019
Oct 17, 2019
Dec 21, 2021
Oct 15, 2020
Oct 17, 2019
Jul 21, 2020
Oct 17, 2020
Jul 21, 2020

Repository files navigation

grocksdb, RocksDB wrapper for Go

Go Report Card Coverage Status godoc

This is a Fork from tecbot/gorocksdb. I respect the author work and community contribution. The LICENSE still remains as upstream.

Why I made a patched clone instead of PR:

  • Supports almost C API (unlike upstream). Catching up with latest version of Rocksdb as promise.
  • This fork contains no defer in codebase (my side project requires as less overhead as possible). This introduces loose convention of how/when to free c-mem, thus break the rule of tecbot/gorocksdb.

Install

Prerequisite

  • librocksdb
  • libsnappy
  • libz
  • liblz4
  • libzstd

Please follow this guide: https://github.com/facebook/rocksdb/blob/master/INSTALL.md to build above libs.

Build

After that, you can install and build grocksdb using the following commands:

go get -u github.com/linxGnu/grocksdb

CGO_CFLAGS="-I/path/to/rocksdb/include" \
CGO_LDFLAGS="-L/path/to/rocksdb -lrocksdb -lstdc++ -lm -lz -lsnappy -llz4 -lzstd" \
  go build

Or just:

go build // if prerequisites are in linker paths

Usage

See also: doc

API Support

Almost C API, excepts:

  • putv/mergev/deletev/delete_rangev
  • compaction_filter/compaction_filter_factory/compaction_filter_context
  • transactiondb_property_value/transactiondb_property_int
  • optimistictransactiondb_property_value/optimistictransactiondb_property_int