https://github.com/mrcsparker/rrocksdb
rocksdb wrapper for R
https://github.com/mrcsparker/rrocksdb
r rocksdb wrapper
Last synced: 4 months ago
JSON representation
rocksdb wrapper for R
- Host: GitHub
- URL: https://github.com/mrcsparker/rrocksdb
- Owner: mrcsparker
- License: lgpl-3.0
- Created: 2015-10-12T04:27:44.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-10-11T05:05:30.000Z (about 7 years ago)
- Last Synced: 2025-02-28T18:42:48.889Z (10 months ago)
- Topics: r, rocksdb, wrapper
- Language: C++
- Size: 25.4 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rrocksdb
Initial checkin of a RocksDB (http://rocksdb.org) wrapper for R.
```R
loadModule("rrocksdb", TRUE)
runRRocksDB <- function() {
db <- new(rrocksdb::DB, "/tmp/foo.db")
print(db)
db$put("name", "Bar")
print(db$get("name"))
batch <- new(rrocksdb::WriteBatch)
for(i in 1:1000) {
batch$put(paste("name", i), paste("Chris", i))
}
db$write(batch)
iterator <- db$iterator()
while (iterator$valid()) {
print(paste(iterator$key, " : ", iterator$value))
iterator$moveNext()
}
s <- db$createColumnFamily("column_family")
}
sampleLoad <- function() {
runRRocksDB()
invisible(gc())
}
```