aboutsummaryrefslogtreecommitdiff
path: root/src/dedo.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/dedo.go')
-rw-r--r--src/dedo.go44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/dedo.go b/src/dedo.go
index 4c56d4d..27dfc4d 100644
--- a/src/dedo.go
+++ b/src/dedo.go
@@ -3573,23 +3573,6 @@ func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) {
return n, f.Close()
}
-/// Tx.CopyFile() copies the entire database to file at the given path. A
-/// reader transaction is maintained during the copy so it is safe to continue
-/// using the database while a copy is in progress.
-func (tx *Tx) CopyFile(path string, mode os.FileMode) error {
- f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode)
- if err != nil {
- return err
- }
-
- _, err = tx.WriteTo(f)
- if err != nil {
- _ = f.Close()
- return err
- }
- return f.Close()
-}
-
/// Tx.Check() performs several consistency checks on the database for this
/// transaction. An error is returned if any inconsistency is found.
///
@@ -3837,33 +3820,6 @@ func (tx *Tx) forEachPage(pgid pgid, depth int, fn func(*page, int)) {
}
}
-/// Tx.Page() returns page information for a given page number. This is only
-/// safe for concurrent use when used by a writable transaction.
-func (tx *Tx) Page(id int) (*PageInfo, error) {
- if tx.db == nil {
- return nil, ErrTxClosed
- } else if pgid(id) >= tx.meta.pgid {
- return nil, nil
- }
-
- // Build the page info.
- p := tx.db.page(pgid(id))
- info := &PageInfo{
- ID: id,
- Count: int(p.count),
- OverflowCount: int(p.overflow),
- }
-
- // Determine the type (or if it's free).
- if tx.db.freelist.freed(pgid(id)) {
- info.Type = "free"
- } else {
- info.Type = p.typ()
- }
-
- return info, nil
-}
-
func noopGetopt(args argsT, _w io.Writer) (argsT, bool) {
return args, true
}