MCPcopy Create free account
hub / github.com/Facets-cloud/flow / ScanWorkdir

Function ScanWorkdir

internal/flowdb/db.go:836–843  ·  view source on GitHub ↗
(row interface{ Scan(dest ...any) error })

Source from the content-addressed store, hash-verified

834const WorkdirCols = "path, name, description, git_remote, last_used_at, created_at"
835
836func 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
845func GetWorkdir(db *sql.DB, path string) (*Workdir, error) {
846 row := db.QueryRow("SELECT "+WorkdirCols+" FROM workdirs WHERE path = ?", path)

Callers 2

GetWorkdirFunction · 0.85
ListWorkdirsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected