(csvPath: string, rows: DbRow[])
| 814 | } |
| 815 | |
| 816 | async function writeDatabaseRows(csvPath: string, rows: DbRow[]): Promise<DatabaseDoc> { |
| 817 | const rel = dbToPosix(csvPath) |
| 818 | const sidecar = await dbReadSidecar(rel) |
| 819 | if (!sidecar) throw new Error(`Database sidecar missing: ${rel}`) |
| 820 | await writeNote(rel, serializeRows(rows, sidecar.fields)) |
| 821 | return dbHydrate(rel, sidecar, rows.map((r) => ({ ...r }))) |
| 822 | } |
| 823 | |
| 824 | async function writeDatabaseSchema( |
| 825 | csvPath: string, |
nothing calls this directly
no test coverage detected