aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-01-15 23:40:19 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-01-15 23:40:19 +0100
commit7550eb651c14a35c42d3aedb11daa49e6fc2f63e (patch)
tree7ce9469859a75eb9e26fd29a7ae5bb5103d0b3b6
parent4aaf55814f7ede26a1035e4837ce7aeeeb11d581 (diff)
adjust interface
-rw-r--r--db.go8
-rw-r--r--internal/btree/btree.go (renamed from btree/btree.go)0
-rw-r--r--internal/hash/hash.go (renamed from hash/hash.go)0
-rw-r--r--internal/hash/hash_func.go (renamed from hash/hash_func.go)0
-rw-r--r--internal/hash/hash_func_test.go (renamed from hash/hash_func_test.go)0
-rw-r--r--internal/hash/hash_test.go (renamed from hash/hash_test.go)0
-rw-r--r--internal/hash/testdata/aliases.db (renamed from hash/testdata/aliases.db)bin65536 -> 65536 bytes
-rw-r--r--internal/recno/rec.go (renamed from recno/rec.go)0
8 files changed, 4 insertions, 4 deletions
diff --git a/db.go b/db.go
index cf3ea9e..7adef46 100644
--- a/db.go
+++ b/db.go
@@ -40,12 +40,12 @@ type DBT struct {
type DB interface {
Close() error
- Del(key *DBT, flags uint) error
+ Del(key []byte, flags uint) error
Fd() uintptr
- Get(key, data *DBT, flags uint) error
- Put(key, data *DBT, flags uint) error
+ Get(key []byte, flags uint) ([]byte, error)
+ Put(key, data []byte, flags uint) error
Sync(flags uint) error
- Seq(key, data *DBT, flags uint) error
+ Seq(key []byte, flags uint) ([]byte, error)
}
func OpenFile(name string, flags, mode int, typ DBType, openinfo interface{}) (DB, error) {
diff --git a/btree/btree.go b/internal/btree/btree.go
index 0681aa0..0681aa0 100644
--- a/btree/btree.go
+++ b/internal/btree/btree.go
diff --git a/hash/hash.go b/internal/hash/hash.go
index c159e78..c159e78 100644
--- a/hash/hash.go
+++ b/internal/hash/hash.go
diff --git a/hash/hash_func.go b/internal/hash/hash_func.go
index 853412b..853412b 100644
--- a/hash/hash_func.go
+++ b/internal/hash/hash_func.go
diff --git a/hash/hash_func_test.go b/internal/hash/hash_func_test.go
index 5ce39b4..5ce39b4 100644
--- a/hash/hash_func_test.go
+++ b/internal/hash/hash_func_test.go
diff --git a/hash/hash_test.go b/internal/hash/hash_test.go
index 0526146..0526146 100644
--- a/hash/hash_test.go
+++ b/internal/hash/hash_test.go
diff --git a/hash/testdata/aliases.db b/internal/hash/testdata/aliases.db
index 0fb69a5..0fb69a5 100644
--- a/hash/testdata/aliases.db
+++ b/internal/hash/testdata/aliases.db
Binary files differ
diff --git a/recno/rec.go b/internal/recno/rec.go
index 57f331a..57f331a 100644
--- a/recno/rec.go
+++ b/internal/recno/rec.go