MCPcopy
hub / github.com/remix-run/remix / loadJournalRows

Function loadJournalRows

packages/data-table/src/lib/migrations/journal-store.ts:55–77  ·  view source on GitHub ↗
(
  adapter: DatabaseAdapter,
  tableName: string,
)

Source from the content-addressed store, hash-verified

53}
54
55export async function loadJournalRows(
56 adapter: DatabaseAdapter,
57 tableName: string,
58): Promise<MigrationJournalRow[]> {
59 let result = await adapter.execute({
60 operation: {
61 kind: 'raw',
62 sql: rawSql(
63 'select id, name, checksum, batch, applied_at from ' + tableName + ' order by id asc',
64 ),
65 },
66 })
67
68 let rows = result.rows ?? []
69
70 return rows.map((row) => ({
71 id: String(row.id),
72 name: String(row.name),
73 checksum: String(row.checksum),
74 batch: Number(row.batch),
75 appliedAt: new Date(String(row.applied_at)),
76 }))
77}
78
79export async function insertJournalRow(
80 adapter: DatabaseAdapter,

Callers 2

runMigrationsFunction · 0.90
statusFunction · 0.90

Calls 3

rawSqlFunction · 0.90
mapMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…