MCPcopy Index your code
hub / github.com/dnote/dnote / GetSystem

Function GetSystem

pkg/cli/database/queries.go:26–32  ·  view source on GitHub ↗

GetSystem scans the given system configuration record onto the destination

(db *DB, key string, dest interface{})

Source from the content-addressed store, hash-verified

24
25// GetSystem scans the given system configuration record onto the destination
26func 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
35func InsertSystem(db *DB, key, val string) error {

Callers 4

getLastSyncAtFunction · 0.92
getLastMaxUSNFunction · 0.92
DoFunction · 0.92
TestGetSystemFunction · 0.85

Calls 1

QueryRowMethod · 0.65

Tested by 1

TestGetSystemFunction · 0.68