Name | Date | Size | ||
---|---|---|---|---|
.. | 11-Jan-2022 | 4 KiB | ||
.gitignore | H A D | 11-Jan-2022 | 274 | |
cgo.go | H A D | 11-Jan-2022 | 663 | |
cgo_static.go | H A D | 11-Jan-2022 | 941 | |
commit.go | H A D | 11-Jan-2022 | 1.7 KiB | |
commit_test.go | H A D | 11-Jan-2022 | 2.1 KiB | |
config.go | H A D | 11-Jan-2022 | 9.7 KiB | |
doc.go | H A D | 11-Jan-2022 | 3.3 KiB | |
docs.go | H A D | 11-Jan-2022 | 521 | |
error.go | H A D | 11-Jan-2022 | 4.7 KiB | |
examples/custom_comparator/ | H | 11-Jan-2022 | 4 KiB | |
file.go | H A D | 11-Jan-2022 | 7.2 KiB | |
file_test.go | H A D | 11-Jan-2022 | 721 | |
forestdb.go | H A D | 11-Jan-2022 | 7.1 KiB | |
forestdb_test.go | H A D | 11-Jan-2022 | 8 KiB | |
info.go | H A D | 11-Jan-2022 | 2.4 KiB | |
info_test.go | H A D | 11-Jan-2022 | 3 KiB | |
iterator.go | H A D | 11-Jan-2022 | 6.4 KiB | |
iterator_test.go | H A D | 11-Jan-2022 | 11.2 KiB | |
kv.go | H A D | 11-Jan-2022 | 2.3 KiB | |
kv_test.go | H A D | 11-Jan-2022 | 2.2 KiB | |
kvbatch.go | H A D | 11-Jan-2022 | 2.8 KiB | |
kvbatch_test.go | H A D | 11-Jan-2022 | 2.8 KiB | |
LICENSE | H A D | 11-Jan-2022 | 11.1 KiB | |
log.go | H A D | 11-Jan-2022 | 2.3 KiB | |
log.h | H A D | 11-Jan-2022 | 94 | |
log_test.go | H A D | 11-Jan-2022 | 2.5 KiB | |
pool.go | H A D | 11-Jan-2022 | 1.7 KiB | |
pool_test.go | H A D | 11-Jan-2022 | 930 | |
README.md | H A D | 11-Jan-2022 | 975 | |
snapshot_marker.go | H A D | 11-Jan-2022 | 3 KiB | |
snapshot_marker_test.go | H A D | 11-Jan-2022 | 3.6 KiB | |
tx.go | H A D | 11-Jan-2022 | 1.9 KiB | |
tx_test.go | H A D | 11-Jan-2022 | 2.8 KiB |
README.md
1# goforestdb 2 3Go bindings for ForestDB 4 5## Building 6 71. Obtain and build forestdb: https://github.com/couchbaselabs/forestdb (run `make install` to install the library) 81. Install header files to system location 9 1. On Ubuntu 14.04: `cd <forestdb_project_dir> && mkdir /usr/local/include/libforestdb && cp include/libforestdb/* /usr/local/include/libforestdb` 101. `go get -u -v -t github.com/couchbase/goforestdb` 11 12## Documentation 13 14See [godocs](http://godoc.org/github.com/couchbase/goforestdb) 15 16## Sample usage (without proper error handling): 17 18 // Open a database 19 db, _ := Open("test", nil) 20 21 // Close it properly when we're done 22 defer db.Close() 23 24 // Store the document 25 doc, _ := NewDoc([]byte("key"), nil, []byte("value")) 26 defer doc.Close() 27 db.Set(doc) 28 29 // Lookup the document 30 doc2, _ := NewDoc([]byte("key"), nil, nil) 31 defer doc2.Close() 32 db.Get(doc2) 33 34 // Delete the document 35 doc3, _ := NewDoc([]byte("key"), nil, nil) 36 defer doc3.Close() 37 db.Delete(doc3) 38