(row interface{ Scan(dest ...any) error })
| 834 | const WorkdirCols = "path, name, description, git_remote, last_used_at, created_at" |
| 835 | |
| 836 | func ScanWorkdir(row interface{ Scan(dest ...any) error }) (*Workdir, error) { |
| 837 | var w Workdir |
| 838 | err := row.Scan(&w.Path, &w.Name, &w.Description, &w.GitRemote, &w.LastUsedAt, &w.CreatedAt) |
| 839 | if err != nil { |
| 840 | return nil, err |
| 841 | } |
| 842 | return &w, nil |
| 843 | } |
| 844 | |
| 845 | func GetWorkdir(db *sql.DB, path string) (*Workdir, error) { |
| 846 | row := db.QueryRow("SELECT "+WorkdirCols+" FROM workdirs WHERE path = ?", path) |
no outgoing calls
no test coverage detected