diff options
Diffstat (limited to 'src/dedo.go')
-rw-r--r-- | src/dedo.go | 13 |
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 |