(identifier: unknown)
| 523 | const SQLITE_CONSTRAINT_UNIQUE_CODE = 2067 |
| 524 | |
| 525 | const normalizeConstraintIdentifier = (identifier: unknown): string => { |
| 526 | if (typeof identifier !== "string") { |
| 527 | return UNKNOWN_CONSTRAINT |
| 528 | } |
| 529 | const trimmed = identifier.trim() |
| 530 | return trimmed.length === 0 ? UNKNOWN_CONSTRAINT : trimmed |
| 531 | } |
| 532 | |
| 533 | const sqliteUniqueConstraintFromCause = (cause: unknown): string => { |
| 534 | if (Predicate.hasProperty(cause, "constraint")) { |
no test coverage detected