()
| 516 | } |
| 517 | |
| 518 | func (d *Database) SQLiteBlobDatabaseConfig() (Database, error) { |
| 519 | if d.DbBackend != SQLiteBackend { |
| 520 | return Database{}, fmt.Errorf("sqlite3 is not the configured database") |
| 521 | } |
| 522 | |
| 523 | blobDBFile, err := d.SQLite.BlobDBFile() |
| 524 | if err != nil { |
| 525 | return Database{}, fmt.Errorf("failed to get blob DB file: %w", err) |
| 526 | } |
| 527 | db := Database{ |
| 528 | Debug: d.Debug, |
| 529 | DbBackend: SQLiteBackend, |
| 530 | Passphrase: d.Passphrase, |
| 531 | SQLite: SQLite{ |
| 532 | DBFile: blobDBFile, |
| 533 | BusyTimeoutSeconds: d.SQLite.BusyTimeoutSeconds, |
| 534 | }, |
| 535 | } |
| 536 | return db, nil |
| 537 | } |
| 538 | |
| 539 | // Validate validates the database config entry |
| 540 | func (d *Database) Validate() error { |
no test coverage detected