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

Function rowToFileRecord

src/db/queries.ts:202–214  ·  view source on GitHub ↗

* Convert database row to FileRecord object

(row: FileRow)

Source from the content-addressed store, hash-verified

200 * Convert database row to FileRecord object
201 */
202function rowToFileRecord(row: FileRow): FileRecord {
203 return {
204 path: row.path,
205 contentHash: row.content_hash,
206 language: row.language as Language,
207 size: row.size,
208 modifiedAt: row.modified_at,
209 indexedAt: row.indexed_at,
210 nodeCount: row.node_count,
211 errors: row.errors ? safeJsonParse(row.errors, undefined) : undefined,
212 generated: row.generated === 1,
213 };
214}
215
216/**
217 * Query builder for the knowledge graph database

Callers 1

getFileByPathMethod · 0.85

Calls 1

safeJsonParseFunction · 0.90

Tested by

no test coverage detected