Commit Graph

24 Commits (09ff73b9a728580290b782419771e747c275c8e4)

Author SHA1 Message Date
RiceChuan 2e4a831e07 docs: remove repetitive words
Signed-off-by: RiceChuan <lc582041246@gmail.com>
2024-12-12 10:55:37 +08:00
Benjamin Wang e457711987 Add test case to reproduce the issue that a cursor can't continue to iterate elements in reverse direction after it has reached to the first element
Signed-off-by: Benjamin Wang <benjamin.ahrtr@gmail.com>
2024-04-30 16:00:06 +01:00
Ishan Tyagi c0b6749ca4 Fix tests to open a bbolt database with file mode:0600 instead of 0666.
Signed-off-by: Ishan Tyagi <ishantyagi25@gmail.com>
2023-07-29 18:06:26 +05:30
Josh Rickmar 7a957f94b2 Introduce errors package and restore API compatibility
This moves the error variables that had been moved to the
internal/common package during recent refactoring to a non-internal
errors package, once again allowing consumers to test for particular
error conditions.

To preserve API compatibility with bbolt v1.3, these error variables
are also redefined in the bbolt package, with deprecation notice to
migrate to bbolt/errors.

Signed-off-by: Josh Rickmar <jrick@zettaport.com>
2023-04-06 13:26:30 +00:00
Benjamin Wang ea511567eb refactor both bolt and guts_cli based on the common package
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-04 04:22:09 +08:00
Piotr Tabor 93380c59e8 testing: group (reorder) imports.
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-28 15:18:46 +01:00
Piotr Tabor 26cc5e3e8b Tests: Migrate from test DB to btesting.DB
Signed-off-by: Piotr Tabor <ptab@google.com>
2022-12-28 15:18:46 +01:00
dchaofei f1918806b2 fix(cursor): Last needs skip empty pages
Signed-off-by: dchaofei <dchaofei@163.com>
2022-11-18 14:25:48 +08:00
Gyuho Lee 76a4670663 *: update import paths "go.etcd.io/bbolt"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 08:15:54 -07:00
Gyuho Lee 0bff9a461c *: update import paths to "github.com/etcd-io/bbolt"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-27 19:25:01 -07:00
Xiang 78b54a42e1 *: use coreos/bbolt as import path 2017-06-20 11:03:31 -07:00
Ben Johnson 8b08bd4a80 test suite refactoring
This commit refactors the test suite to make it cleaner and to use the
standard testing library better. The `assert()`, `equals()`, and `ok()`
functions have been removed and some test names have been changed for
clarity.

No functionality has been changed.
2016-01-02 21:30:31 -07:00
Luke Champine 852d3024fa skip empty pages during cursor seek
This commit fixes an issue where keys are skipped by cursors after
deletions occur in a bucket. This occurred because the cursor seeks
to the leaf page but does not check if it is empty.

Fixes #429, #450
2015-11-05 22:39:15 -07:00
Ben Johnson 1dc60ba7a1 Add cursor examples. 2014-08-16 15:20:31 -06:00
Ben Johnson 44e6192d2b Remove testify. 2014-07-26 17:17:03 -06:00
Ben Johnson ba6badc57f Move tests to a test package. 2014-07-26 15:11:47 -06:00
Ben Johnson ca2339d7cb Remove wrapping test closures. 2014-07-26 14:44:04 -06:00
Martin Kobetic a00a88baef add Cursor.Delete() 2014-06-11 21:46:19 +00:00
Ben Johnson 63a9afd028 Add seek forward test. 2014-06-09 12:31:52 -06:00
Ben Johnson afe8123d91 Merge pull request #134 from Shopify/c_cursor
C cursor
2014-04-21 07:24:48 -06:00
Ben Johnson c0ae4881ab Add Cursor.Next() to C cursor. 2014-04-16 15:17:35 -04:00
Ben Johnson 63a8cddd2b Add Cursor.Bucket() function.
This commit adds an accessor to the Cursor type to retrieve the Bucket that
it was created from.
2014-04-16 09:38:53 -04:00
Ben Johnson 2505b9a7dc Return bucket from CreateBucket() functions.
This commit changes the API for:

    Tx.CreateBucket()
    Tx.CreateBucketIfNotExists()
    Bucket.CreateBucket()
    Bucket.CreateBucketIfNotExists()

These functions now return the *Bucket and error instead of just the error.
2014-04-15 23:45:06 -04:00
Ben Johnson 698b07b074 Add nested buckets.
This commit adds the ability to create buckets inside of other buckets.
It also replaces the buckets page with a root bucket.

Fixes #56.
2014-04-11 12:36:54 -06:00