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

Function isConstraintConflict

packages/effect/src/unstable/sql/Migrator.ts:326–327  ·  view source on GitHub ↗
(error: SqlError)

Source from the content-addressed store, hash-verified

324const migrationOrder = Order.make<ResolvedMigration>(([a], [b]) => Order.Number(a, b))
325
326const isConstraintConflict = (error: SqlError): boolean =>
327 error.reason._tag === "ConstraintError" || error.reason._tag === "UniqueViolation"
328
329/**
330 * Creates a migration loader from a glob record of dynamic import functions,

Callers 1

makeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected