This is the first I've heard of storm, looks like it currently has more features (some I think I might try and implement in bolthold). I think bolthold's querying is a bit simpler to understand, but I may be biased in that regard.
Storm definitely has the better name though :) On Thursday, November 17, 2016 at 8:52:53 AM UTC-6, Diep Pham wrote: > > This looks very interesting. How does it compare to > https://github.com/asdine/storm? > > Tim Shannon wrote: > > I've used BoltDB <https://github.com/boltdb/bolt> in a quite a few > > projects, and have found it to be fast and very reliable. But I've > > found that I was writing the same serialization and filtering code for > > each project, so I thought I'd try and build a more generic, reusable > > solution for storing and retrieving Go Types in a BoltDB file. > > > > https://github.com/timshannon/bolthold > > > > You simply open a BoltHold file and start inserting Go types: > > > > store, err := bolthold.Open(filename, 0666, nil) > > if err != nil { > > //handle error > > } > > err = store.Insert("key", &Item{ > > Name: "Test Name", > > Created: time.Now(), > > }) > > > > > > If you add the boltHoldIndex struct tag to your type, BoltHold will > > automatically add and update an index for that field: > > > > type Person struct { > > Name string > > Division string `boltholdIndex:"Division"` > > } > > > > > > You can use chainable queries to retrieve, delete, or update records in > > the BoltHold database. > > > > > bolthold.Where("FieldName").Eq(value).And("AnotherField").Lt(AnotherValue).Or(bolthold.Where("FieldName").Eq(anotherValue)) > > > > > > > > In my preliminary benchmarks, I'm finding that the cost of serialization > > plus index updates don't add any significant overhead compared to disk > > access (which is to be expected), and adding indexes can significant > > improve read speed because you can avoid unnecessary disk accesses, > > however, I haven't written a lot of benchmarks, so any feedback you guys > > have on how they can be improved to be more accurate, I'd love to hear. > > > > || > > BenchmarkRawInsert-4 300 5351308ns/op > > BenchmarkNoIndexInsert-4 300 5421718ns/op > > BenchmarkIndexedInsert-4 300 5360532ns/op > > BenchmarkNoIndexUpsert-4 300 5468971ns/op > > BenchmarkIndexedUpsert-4 200 5700991ns/op > > BenchmarkNoIndexInsertJSON-4 300 5555565ns/op > > BenchmarkFindNoIndex-4 50 27340697ns/op > > BenchmarkFindIndexed-4 3000 368265ns/op > > > > It's a first release and the indexing and querying implementation is > > definitely what I would consider naive at this point, and I'm sure there > > are several improvements that can be made, however it's already proving > > to be a useful tool to me, and I'd love any feedback the community has > > to offer. > > > > There's lots more information in the README at > > https://github.com/timshannon/bolthold > > > > Thanks, > > > > -- > > You received this message because you are subscribed to the Google > > Groups "golang-nuts" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to golang-nuts...@googlegroups.com <javascript:> > > <mailto:golang-nuts+unsubscr...@googlegroups.com <javascript:>>. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.