---------- playbook models ---------- Playbook mirrors the playbooks table.
| 886 | } |
| 887 | out = append(out, w) |
| 888 | } |
| 889 | return out, rows.Err() |
| 890 | } |
| 891 | |
| 892 | func UpsertWorkdir(db *sql.DB, path, name, description, gitRemote string) error { |
| 893 | now := NowISO() |
| 894 | _, err := db.Exec(` |
| 895 | INSERT INTO workdirs (path, name, description, git_remote, last_used_at, created_at) |
| 896 | VALUES (?, ?, ?, ?, ?, ?) |
| 897 | ON CONFLICT(path) DO UPDATE SET |
| 898 | name = COALESCE(NULLIF(excluded.name, ''), workdirs.name), |
| 899 | description = COALESCE(NULLIF(excluded.description, ''), workdirs.description), |
nothing calls this directly
no outgoing calls
no test coverage detected