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

Function normalizeConstraint

packages/sql/pg/src/internal/sqlError.ts:31–35  ·  view source on GitHub ↗
(constraint: unknown)

Source from the content-addressed store, hash-verified

29}
30
31const normalizeConstraint = (constraint: unknown): string => {
32 if (typeof constraint !== "string") return "unknown"
33 const normalized = constraint.trim()
34 return normalized.length === 0 ? "unknown" : normalized
35}
36
37export const classifySqlState = (
38 code: string | undefined,

Callers 1

classifySqlStateFunction · 0.85

Calls 1

trimMethod · 0.80

Tested by

no test coverage detected