Commit Graph

14 Commits

Author SHA1 Message Date
Thomas Corbière ee67e34519 Fix lint errors (#190)
* use increment and decrement operators.

* remove unnecessary else branches.

* fix receiver names.

* remove omittable code.

* fix dot imports.
2018-04-03 12:23:28 +02:00
Ethan Buchman 1b5176003a DbBackend -> DBBackend 2018-02-02 22:31:17 -05:00
Adrian Brink cbc63518e5
Export DbBackendType in order to fix IAVL tests 2018-02-02 18:50:24 +01:00
Jae Kwon f6dbe9ba05
Refactor string -> dbBackendType 2018-02-02 14:08:05 +04:00
Jae Kwon ca56a274bd Nil bytes are OK for Get/Set etc
And s/Release/Close/g
2017-12-19 20:36:37 -08:00
Jae Kwon 4ce8448d7f
Nil keys are OK, deprecate BeginningKey/EndingKey (#101)
* Nil keys are OK, deprecate BeginningKey/EndingKey
2017-12-17 13:11:28 -08:00
Ethan Buchman 66b0e8fa2d fix c level db iterator 2017-12-15 15:58:23 -05:00
Emmanuel Odeke a7b20d4e46
db: Simplify exists check, fix IsKeyInDomain signature, Iterator Close
+ *FSDB.HasKey now uses common.FileExists to test for file existence
+ IsKeyInDomain takes key as a []byte slice instead of as a string
to avoid extraneous []byte<-->string conversions for start and end
+ Iterator.Close() instead of Iterator.Release()
+ withDB helper to encapsulate DB creation, deferred cleanups
so that for loops can use opened DBs and discard them ASAP

Addressing accepted changes from review with @jaekwon
2017-12-15 02:58:51 -07:00
Ethan Buchman d4aeca8ce3 fixes from @melekes 2017-12-13 20:11:11 -05:00
Ethan Buchman bb115d4d61 cleanupDBDir 2017-12-12 19:28:52 -05:00
Ethan Buchman ba8c5045b5 db: fixes to fsdb and clevledb 2017-12-12 19:22:08 -05:00
Ethan Buchman c547caf04f db: some test cleanup 2017-12-12 19:08:22 -05:00
Ethan Buchman 5b7f90dfb2 db: test panic on nil key 2017-12-12 18:42:47 -05:00
Jae Kwon 8481c49c82
CacheDB (#67)
* Add CacheDB & SimpleMap
* Generic memBatch; Fix cLevelDB tests
* CacheWrap() for CacheDB and MemDB
* Change Iterator to match LeviGo Iterator
* Fixes from review
* cacheWrapWriteMutex and some race fixes
* Use tmlibs/common
* NewCWWMutex is exposed.  DB can be CacheWrap'd
* Remove GetOK, not needed
* Fsdb (#72)
* Add FSDB
* Review fixes from Anton
* Review changes
* Fixes from review
2017-11-09 17:42:32 -05:00