Skip to content

Commit 9221ee7

Browse files
chore: revert "refactor: add named interface for type alias (#127)" and retract tag (#134)
* Revert "refactor: add named interface for type alias (#127)" This reverts commit 38785e9. * retract, changelog entry * fix
1 parent 85d234a commit 9221ee7

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

3-
## [v1.1.2] - 2025-05-28
3+
## [v1.1.3] - 2025-06-03
4+
5+
* Revert commit `38785e92904d435a97e0d1b171089278bddf6760` - "Make `Iterator` and `Batch` interfaces more flexible by a type alias"
6+
7+
## [v1.1.2] - 2025-05-28 (RETRACTED)
48

59
* Make `Iterator` and `Batch` interfaces more flexible by a type alias
610
* Update deps to the latest versions

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ require (
4747
// grocksdb stays at v1.8.x in cosmos-db as it should support RocksDB v8.
4848
// the cosmos sdk v2 uses directly store/v2 which uses RocksDB v9 from 0.52+
4949
replace github.com/linxGnu/grocksdb => github.com/linxGnu/grocksdb v1.8.12
50+
51+
retract v1.1.2

types.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ type DB interface {
7676
Stats() map[string]string
7777
}
7878

79-
// BatchI represents a group of writes. They may or may not be written atomically depending on the
79+
// Batch represents a group of writes. They may or may not be written atomically depending on the
8080
// backend. Callers must call Close on the batch when done.
8181
//
8282
// As with DB, given keys and values should be considered read-only, and must not be modified after
8383
// passing them to the batch.
84-
type BatchI interface {
84+
type Batch = interface {
8585
// Set sets a key/value pair.
8686
// CONTRACT: key, value readonly []byte
8787
Set(key, value []byte) error
@@ -107,9 +107,7 @@ type BatchI interface {
107107
GetByteSize() (int, error)
108108
}
109109

110-
type Batch = BatchI
111-
112-
// IteratorI represents an iterator over a domain of keys. Callers must call Close when done.
110+
// Iterator represents an iterator over a domain of keys. Callers must call Close when done.
113111
// No writes can happen to a domain while there exists an iterator over it, some backends may take
114112
// out database locks to ensure this will not happen.
115113
//
@@ -132,7 +130,7 @@ type Batch = BatchI
132130
// if err := itr.Error(); err != nil {
133131
// ...
134132
// }
135-
type IteratorI interface {
133+
type Iterator = interface {
136134
// Domain returns the start (inclusive) and end (exclusive) limits of the iterator.
137135
// CONTRACT: start, end readonly []byte
138136
Domain() (start, end []byte)
@@ -159,5 +157,3 @@ type IteratorI interface {
159157
// Close closes the iterator, relasing any allocated resources.
160158
Close() error
161159
}
162-
163-
type Iterator = IteratorI

0 commit comments

Comments
 (0)