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

Function ListWorkdirs

internal/flowdb/db.go:850–866  ·  view source on GitHub ↗
(db *sql.DB)

Source from the content-addressed store, hash-verified

848 if err != nil {
849 return nil, fmt.Errorf("scan task: %w", err)
850 }
851 out = append(out, t)
852 }
853 return out, rows.Err()
854}
855
856// ---------- workdir queries ----------
857
858const WorkdirCols = "path, name, description, git_remote, last_used_at, created_at"
859
860func ScanWorkdir(row interface{ Scan(dest ...any) error }) (*Workdir, error) {
861 var w Workdir
862 err := row.Scan(&w.Path, &w.Name, &w.Description, &w.GitRemote, &w.LastUsedAt, &w.CreatedAt)
863 if err != nil {
864 return nil, err
865 }
866 return &w, nil
867}
868
869func GetWorkdir(db *sql.DB, path string) (*Workdir, error) {

Callers 2

cmdWorkdirListFunction · 0.92
TestCmdWorkdirListFunction · 0.92

Calls 1

ScanWorkdirFunction · 0.85

Tested by 1

TestCmdWorkdirListFunction · 0.74