MCPcopy Index your code
hub / github.com/anomalyco/opencode / renderSchema

Function renderSchema

packages/core/script/migration.ts:142–154  ·  view source on GitHub ↗
(sql: string)

Source from the content-addressed store, hash-verified

140}
141
142function renderSchema(sql: string) {
143 return `import { Effect } from "effect"
144import type { DatabaseMigration } from "./migration"
145
146export default {
147 up(tx) {
148 return Effect.gen(function* () {
149${renderStatements(sql)}
150 })
151 },
152} satisfies Omit<DatabaseMigration.Migration, "id">
153`
154}
155
156function renderStatements(sql: string) {
157 return sql

Callers 2

generateFunction · 0.85
checkFunction · 0.85

Calls 1

renderStatementsFunction · 0.85

Tested by

no test coverage detected