(identifier: unknown)
| 69 | const UNKNOWN_CONSTRAINT = "unknown" |
| 70 | |
| 71 | const normalizeConstraintIdentifier = (identifier: unknown): string => { |
| 72 | if (typeof identifier !== "string") { |
| 73 | return UNKNOWN_CONSTRAINT |
| 74 | } |
| 75 | const trimmed = identifier.trim() |
| 76 | return trimmed.length === 0 ? UNKNOWN_CONSTRAINT : trimmed |
| 77 | } |
| 78 | |
| 79 | const mssqlCauseProperty = (cause: unknown, property: "constraint" | "message"): unknown => { |
| 80 | if (typeof cause !== "object" || cause === null || !(property in cause)) { |
no outgoing calls
no test coverage detected