Commit Graph

15 Commits (012f88489b620a08d097a8972419f4f3d9f81d92)

Author SHA1 Message Date
Xiang 78b54a42e1 *: use coreos/bbolt as import path 2017-06-20 11:03:31 -07:00
Ben Johnson f5d275b537
Minor bolt compact revisions 2016-09-05 15:43:02 -06:00
Ben Johnson 52d0f5e6a9
Merge branch 'compact-db' of https://github.com/vincent-petithory/bolt into vincent-petithory-compact-db 2016-09-01 14:47:06 -06:00
Rodolfo Carvalho 10b100fe0f Fix `bolt stats` output 2015-12-05 19:56:31 +01:00
Vincent Petithory 575904ae85 cli: add compact command
compact rewrites a bolt db, recursively walking its keys
  in byte order.
2015-11-19 19:18:07 +01:00
Ben Johnson d0e8a99e30 Refactor bolt CLI. 2015-04-14 16:32:20 -06:00
Ben Johnson 44e6192d2b Remove testify. 2014-07-26 17:17:03 -06:00
Ben Johnson 00ee0da528 Add Open() options, flock timeout.
This commit changes Open() to provide an additional Options argument. The options
argument currently only has a Timeout which will cause the Open() to return
ErrTimeout if a file lock cannot be obtained in time.

Fixes #207.
2014-06-21 14:44:28 -06:00
Ben Johnson e6b5fdc30e Add import/export to CLI.
This commit adds two new commands:

    bolt import --input INPUT PATH
    bolt export PATH

This exports the database in a simple, nested, key/value JSON document.
Each node in the document has a "key", a "value", and an optional "type".
The key and value fields are both base64 encoded.
2014-04-11 14:05:58 -06:00
Ben Johnson fea388b03d Refactor bolt commands into individual files. 2014-03-27 22:36:05 -06:00
Ben Johnson f8ad21bad3 Make DB/Tx API more consistent.
I consolidated the DB.Tx() and DB.RWTx() calls into a single
DB.Begin(writable bool) call. This is more consistent with the
database/sql library.

I also changed the DB.Do() and DB.With() call to DB.Update() and
DB.View(), respectively. This is more intuitive and more inline with
other database verbiage.
2014-03-24 11:43:06 -06:00
Ben Johnson 845a4d47ce Add 'bolt buckets'. 2014-03-21 22:56:17 -06:00
Ben Johnson 64a52452d3 Add 'bolt set'. 2014-03-21 22:51:22 -06:00
Ben Johnson 8fa6531b1c Add 'bolt keys'. 2014-03-21 22:05:28 -06:00
Ben Johnson e8d3ae6287 Add 'bolt get'. 2014-03-21 22:00:34 -06:00