Documentation ¶
Index ¶
- func Compact(dbfile string) (nTables, nViews int, oldSize, newSize uint64, err error)
- func Dump(db *Database, to, publicKey string) (nTables, nViews int, err error)
- func DumpDatabase(dbfile, to string) (nTables, nViews int, err error)
- func DumpDbTable(db *Database, table, to, publicKey string) (nrecs int, err error)
- func DumpTable(dbfile, table, to string) (nrecs int, err error)
- func LoadDatabase(from, dbfile, privateKey, passphrase string) (nTables, nViews int, err error)
- func LoadDbTable(table, from, privateKey, passphrase string, db *Database) (n int, err error)
- func LoadTable(table, dbfile string) (int, error)
- type WriterPlus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compact ¶
Compact cleans up old records and index nodes that are no longer in use. It does this by copying live data to a new database file. In the process it concurrently does a full check of the database.
func DumpDatabase ¶
DumpDatabase exports the entire database to a file. In the process it concurrently does a full check of the database.
func DumpDbTable ¶
func DumpTable ¶
DumpTable exports a dumped table to a file. It returns the number of records dumped or panics on error.
func LoadDatabase ¶
LoadDatabase imports a dumped database from a file using a worker pool. It returns the number of tables loaded. Errors are fatal. It does NOT check foreign key data because it assumes the dump was from a valid database.
func LoadDbTable ¶
LoadDbTable loads a single table. It is use by dbms.Load / Database.Load It will replace an already existing table. It returns the number of records loaded.