()
| 589 | } |
| 590 | |
| 591 | func (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 | |
| 603 | func (s *SQLite) connectionStringForDBFile(dbFile string) string { |
| 604 | connectionString := fmt.Sprintf("%s?_journal_mode=WAL&_foreign_keys=ON&_txlock=immediate", dbFile) |
no test coverage detected