MCPcopy Create free account
hub / github.com/Effect-TS/effect / insertMigrations

Function insertMigrations

packages/effect/src/unstable/sql/Migrator.ts:153–160  ·  view source on GitHub ↗
(
      rows: ReadonlyArray<[id: number, name: string]>
    )

Source from the content-addressed store, hash-verified

151 })
152
153 const insertMigrations = (
154 rows: ReadonlyArray<[id: number, name: string]>
155 ) =>
156 sql`INSERT INTO ${sql(table)} ${
157 sql.insert(
158 rows.map(([migration_id, name]) => ({ migration_id, name }))
159 )
160 }`.withoutTransform
161
162 const latestMigration = Effect.map(
163 sql<{ migration_id: number; name: string; created_at: Date }>`SELECT migration_id, name, created_at FROM ${

Callers 1

makeFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected