Datastore implementation using bbolt as a backend
rtradeltd / go-ds-bbolt Goto Github PK
View Code? Open in Web Editor NEWDatastore implementation using bbolt as a backend
License: Apache License 2.0
Datastore implementation using bbolt as a backend
License: Apache License 2.0
BoltDB supports transactions, so lets implement a proper batched datastore.
Query system doesn't properly return results, and seems to hang indefinitely
Wrapping the datastore in a namespace wrapper causes Queries to fail, as per the following output from using go-ds-bbolt
with krab
=== RUN TestKrab
--- FAIL: TestKrab (0.15s)
panic: expected prefix not found [recovered]
panic: expected prefix not found
goroutine 21 [running]:
testing.tRunner.func1(0xc000152100)
/usr/local/go/src/testing/testing.go:830 +0x69d
panic(0xa84fc0, 0xd03640)
/usr/local/go/src/runtime/panic.go:522 +0x1b5
github.com/ipfs/go-datastore/keytransform.PrefixTransform.InvertKey(0xb2cfd1, 0xd, 0xc00016c0a0, 0x97, 0x0, 0x0)
/home/solidity/go/pkg/mod/github.com/ipfs/[email protected]/keytransform/transforms.go:42 +0x229
github.com/ipfs/go-datastore/keytransform.(*Datastore).Query.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/solidity/go/pkg/mod/github.com/ipfs/[email protected]/keytransform/keytransform.go:78 +0x16c
github.com/ipfs/go-datastore/query.(*resultsIter).NextSync(0xc0000ecaf0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/solidity/go/pkg/mod/github.com/ipfs/[email protected]/query/query.go:319 +0xd4
github.com/ipfs/go-datastore/query.(*resultsIter).Rest(0xc0000ecaf0, 0x1, 0x1, 0x0, 0x0, 0x0)
/home/solidity/go/pkg/mod/github.com/ipfs/[email protected]/query/query.go:330 +0x7f
github.com/RTradeLtd/krab.(*Keystore).List(0xc0000b8ae0, 0xb33011, 0x19, 0xd17180, 0xc0000b8e00, 0x0)
/home/solidity/Code/krab/krab.go:107 +0x149
github.com/RTradeLtd/krab_test.TestKrab(0xc000152100)
/home/solidity/Code/krab/krab_test.go:62 +0x4ac
testing.tRunner(0xc000152100, 0xc67f38)
/usr/local/go/src/testing/testing.go:865 +0x164
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:916 +0x65b
FAIL github.com/RTradeLtd/krab 0.166s
Currently we only support extremely basic queries, it would be nice to be able to support more advanced systems, leveraging prefixes, limits, offsets, etc...
For whatever reason, the number of results returned by Query
do not ever go above 1. Even though our query searching may very well discover more than 1 result, only 1 result is given
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.