aboutsummaryrefslogtreecommitdiff
path: root/src/dedo.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-01-24 10:14:42 -0300
committerEuAndreh <eu@euandre.org>2025-01-24 10:14:42 -0300
commit7c57899812df8c2d11119e9944de35fb00a73ce9 (patch)
tree16553b357c9dbadd9f9c4cfacc58726792dbc39d /src/dedo.go
parentsrc/dedo.go: Simplify initDB() (diff)
downloaddedo-7c57899812df8c2d11119e9944de35fb00a73ce9.tar.gz
dedo-7c57899812df8c2d11119e9944de35fb00a73ce9.tar.xz
src/dedo.go: Remove deprecated Tx.Copy() method
Diffstat (limited to 'src/dedo.go')
-rw-r--r--src/dedo.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/dedo.go b/src/dedo.go
index a7bc629..685f84c 100644
--- a/src/dedo.go
+++ b/src/dedo.go
@@ -433,9 +433,11 @@ const (
// maxAllocSize is the size used when creating array pointers.
maxAllocSize = 0x7FFFFFFF
+ // FIXME: why?
// MaxKeySize is the maximum length of a key, in bytes.
MaxKeySize = 32768
+ // FIXME: why?
// MaxValueSize is the maximum length of a value, in bytes.
MaxValueSize = (1 << 31) - 2
@@ -3744,15 +3746,6 @@ func (tx *Tx) close() {
tx.pages = nil
}
-// Copy writes the entire database to a writer.
-// This function exists for backwards compatibility.
-//
-// Deprecated; Use WriteTo() instead.
-func (tx *Tx) Copy(w io.Writer) error {
- _, err := tx.WriteTo(w)
- return err
-}
-
// WriteTo writes the entire database to a writer.
// If err == nil then exactly tx.Size() bytes will be written into the writer.
func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) {
@@ -3811,7 +3804,7 @@ func (tx *Tx) CopyFile(path string, mode os.FileMode) error {
return err
}
- err = tx.Copy(f)
+ _, err = tx.WriteTo(f)
if err != nil {
_ = f.Close()
return err