diff options
author | Martin Kobetic <mkobetic@gmail.com> | 2014-05-21 16:57:29 +0000 |
---|---|---|
committer | Martin Kobetic <mkobetic@gmail.com> | 2014-05-21 16:57:29 +0000 |
commit | 8cd1c60f7cc71464c4860821de0c26c40b68b980 (patch) | |
tree | 5f9b8e7173780842993fcca8ef8fd0b4829e75e5 | |
parent | add tx.Size() and ensure tx.Copy() copies exactly that many bytes (diff) | |
download | dedo-8cd1c60f7cc71464c4860821de0c26c40b68b980.tar.gz dedo-8cd1c60f7cc71464c4860821de0c26c40b68b980.tar.xz |
review comments
-rw-r--r-- | tx.go | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -73,7 +73,7 @@ func (tx *Tx) DB() *DB { return tx.db } -// Size returns current database size in bytes (as seen by this transaction) +// Size returns current database size in bytes as seen by this transaction. func (tx *Tx) Size() int64 { return int64(tx.meta.pgid) * int64(tx.db.pageSize) } @@ -239,7 +239,6 @@ func (tx *Tx) close() { // using the database while a copy is in progress. // Copy will write exactly tx.Size() bytes into the writer. func (tx *Tx) Copy(w io.Writer) error { - // Open reader on the database. f, err := os.Open(tx.db.path) if err != nil { |