MCPcopy Create free account
hub / github.com/cloudbase/garm / BlobDBFile

Method BlobDBFile

config/config.go:591–601  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

589}
590
591func (s *SQLite) BlobDBFile() (string, error) {
592 if err := s.Validate(); err != nil {
593 return "", fmt.Errorf("failed to validate sqlite3 config")
594 }
595
596 parent := filepath.Dir(s.DBFile)
597 dbFileName := filepath.Base(s.DBFile)
598 blobFile := fmt.Sprintf("blob-%s", dbFileName)
599 blobPath := filepath.Join(parent, blobFile)
600 return blobPath, nil
601}
602
603func (s *SQLite) connectionStringForDBFile(dbFile string) string {
604 connectionString := fmt.Sprintf("%s?_journal_mode=WAL&_foreign_keys=ON&_txlock=immediate", dbFile)

Callers 1

Calls 1

ValidateMethod · 0.95

Tested by

no test coverage detected