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

Method SQLiteBlobDatabaseConfig

config/config.go:518–537  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

516}
517
518func (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
540func (d *Database) Validate() error {

Callers 1

NewSQLDatabaseFunction · 0.80

Calls 1

BlobDBFileMethod · 0.80

Tested by

no test coverage detected