MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / View

Method View

db.go:219–225  ·  view source on GitHub ↗

View executes a function within a managed read-only transaction.

(fn func(tx *Tx) error)

Source from the content-addressed store, hash-verified

217
218// View executes a function within a managed read-only transaction.
219func (db *DB) View(fn func(tx *Tx) error) error {
220 if fn == nil {
221 return ErrFn
222 }
223
224 return db.managed(false, fn)
225}
226
227// Backup copies the database to file directory at the given dir.
228func (db *DB) Backup(dir string) error {

Callers 15

BackupMethod · 0.95
BackupTarGZMethod · 0.95
BenchmarkIterator_NextFunction · 0.80
BenchmarkIterator_PrevFunction · 0.80
BenchmarkIterator_SeekFunction · 0.80
BenchmarkIterator_RewindFunction · 0.80

Calls 1

managedMethod · 0.95