MCPcopy Index your code
hub / github.com/Effect-TS/effect / pgDumpFile

Function pgDumpFile

packages/sql-pg/src/PgMigrator.ts:80–89  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

78 )
79
80 const pgDumpFile = (path: string) =>
81 Effect.gen(function*() {
82 const fs = yield* FileSystem
83 const path_ = yield* Path
84 const dump = yield* pgDumpAll
85 yield* fs.makeDirectory(path_.dirname(path), { recursive: true })
86 yield* fs.writeFileString(path, dump)
87 }).pipe(
88 Effect.mapError((error) => new Migrator.MigrationError({ reason: "failed", message: error.message }))
89 )
90
91 return pgDumpFile(path)
92 }

Callers 1

dumpSchemaFunction · 0.85

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected