GetSystem scans the given system configuration record onto the destination
(db *DB, key string, dest interface{})
| 24 | |
| 25 | // GetSystem scans the given system configuration record onto the destination |
| 26 | func GetSystem(db *DB, key string, dest interface{}) error { |
| 27 | if err := db.QueryRow("SELECT value FROM system WHERE key = ?", key).Scan(dest); err != nil { |
| 28 | return errors.Wrap(err, "finding system configuration record") |
| 29 | } |
| 30 | |
| 31 | return nil |
| 32 | } |
| 33 | |
| 34 | // InsertSystem inserets a system configuration |
| 35 | func InsertSystem(db *DB, key, val string) error { |