Documentation
¶
Index ¶
- type DB
- func (s *DB) AllGlobalFiles(folder string) (iter.Seq[db.FileMetadata], func() error)
- func (s *DB) AllGlobalFilesPrefix(folder string, prefix string) (iter.Seq[db.FileMetadata], func() error)
- func (s *DB) AllLocalBlocksWithHash(folder string, hash []byte) (iter.Seq[db.BlockMapEntry], func() error)
- func (s *DB) AllLocalFiles(folder string, device protocol.DeviceID) (iter.Seq[protocol.FileInfo], func() error)
- func (s *DB) AllLocalFilesBySequence(folder string, device protocol.DeviceID, startSeq int64, limit int) (iter.Seq[protocol.FileInfo], func() error)
- func (s *DB) AllLocalFilesWithBlocksHash(folder string, h []byte) (iter.Seq[db.FileMetadata], func() error)
- func (s *DB) AllLocalFilesWithPrefix(folder string, device protocol.DeviceID, prefix string) (iter.Seq[protocol.FileInfo], func() error)
- func (s *DB) AllNeededGlobalFiles(folder string, device protocol.DeviceID, order config.PullOrder, ...) (iter.Seq[protocol.FileInfo], func() error)
- func (s *DB) Close() error
- func (s *DB) CountGlobal(folder string) (db.Counts, error)
- func (s *DB) CountLocal(folder string, device protocol.DeviceID) (db.Counts, error)
- func (s *DB) CountNeed(folder string, device protocol.DeviceID) (db.Counts, error)
- func (s *DB) CountReceiveOnlyChanged(folder string) (db.Counts, error)
- func (s DB) DeleteKV(key string) error
- func (s *DB) DeleteMtime(folder, name string) error
- func (s *DB) DropAllFiles(folder string, device protocol.DeviceID) error
- func (s *DB) DropAllIndexIDs() error
- func (s *DB) DropDevice(device protocol.DeviceID) error
- func (s *DB) DropFilesNamed(folder string, device protocol.DeviceID, names []string) error
- func (s *DB) DropFolder(folder string) error
- func (s *DB) GetDeviceFile(folder string, device protocol.DeviceID, file string) (protocol.FileInfo, bool, error)
- func (s *DB) GetDeviceSequence(folder string, device protocol.DeviceID) (int64, error)
- func (s *DB) GetGlobalAvailability(folder, file string) ([]protocol.DeviceID, error)
- func (s *DB) GetGlobalFile(folder string, file string) (protocol.FileInfo, bool, error)
- func (s *DB) GetIndexID(folder string, device protocol.DeviceID) (protocol.IndexID, error)
- func (s DB) GetKV(key string) ([]byte, error)
- func (s *DB) GetMtime(folder, name string) (ondisk, virtual time.Time)
- func (s *DB) ListDevicesForFolder(folder string) ([]protocol.DeviceID, error)
- func (s *DB) ListFolders() ([]string, error)
- func (s DB) PrefixKV(prefix string) (iter.Seq[db.KeyValue], func() error)
- func (s DB) PutKV(key string, val []byte) error
- func (s *DB) PutMtime(folder, name string, ondisk, virtual time.Time) error
- func (s *DB) RemoteSequences(folder string) (map[protocol.DeviceID]int64, error)
- func (s *DB) Service(maintenanceInterval time.Duration) suture.Service
- func (s *DB) SetIndexID(folder string, device protocol.DeviceID, id protocol.IndexID) error
- func (s *DB) Statistics() (*DatabaseStatistics, error)
- func (s *DB) Update(folder string, device protocol.DeviceID, fs []protocol.FileInfo) error
- type DatabaseStatistics
- type Option
- type Service
- type TableStatistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func OpenForMigration ¶
Open the database with options suitable for the migration inserts. This is not a safe mode of operation for normal processing, use only for bulk inserts with a close afterwards.
func (*DB) AllGlobalFiles ¶
func (*DB) AllGlobalFilesPrefix ¶
func (*DB) AllLocalBlocksWithHash ¶
func (*DB) AllLocalFiles ¶
func (*DB) AllLocalFilesBySequence ¶
func (*DB) AllLocalFilesWithBlocksHash ¶
func (*DB) AllLocalFilesWithPrefix ¶
func (*DB) AllNeededGlobalFiles ¶
func (*DB) CountLocal ¶
func (*DB) CountReceiveOnlyChanged ¶
func (*DB) DeleteMtime ¶
func (*DB) DropAllIndexIDs ¶
func (*DB) DropFilesNamed ¶
func (*DB) DropFolder ¶
func (*DB) GetDeviceFile ¶
func (*DB) GetDeviceSequence ¶
func (*DB) GetGlobalAvailability ¶
func (*DB) GetGlobalFile ¶
func (*DB) GetIndexID ¶
func (*DB) ListDevicesForFolder ¶
func (*DB) ListFolders ¶
func (*DB) RemoteSequences ¶
func (*DB) SetIndexID ¶
func (*DB) Statistics ¶
func (s *DB) Statistics() (*DatabaseStatistics, error)
type DatabaseStatistics ¶
type DatabaseStatistics struct {
Name string `json:"name"`
FolderID string `json:"folderID,omitempty"`
Tables []TableStatistics `json:"tables"`
Total TableStatistics `json:"total"`
Children []DatabaseStatistics `json:"children,omitempty"`
}
type TableStatistics ¶
Click to show internal directories.
Click to hide internal directories.