MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / rowToFileRecord

Function rowToFileRecord

src/db/queries.ts:175–186  ·  view source on GitHub ↗

* Convert database row to FileRecord object

(row: FileRow)

Source from the content-addressed store, hash-verified

173 * Convert database row to FileRecord object
174 */
175function rowToFileRecord(row: FileRow): FileRecord {
176 return {
177 path: row.path,
178 contentHash: row.content_hash,
179 language: row.language as Language,
180 size: row.size,
181 modifiedAt: row.modified_at,
182 indexedAt: row.indexed_at,
183 nodeCount: row.node_count,
184 errors: row.errors ? safeJsonParse(row.errors, undefined) : undefined,
185 };
186}
187
188/**
189 * Query builder for the knowledge graph database

Callers 1

getFileByPathMethod · 0.85

Calls 1

safeJsonParseFunction · 0.90

Tested by

no test coverage detected