(cause: unknown)
| 896 | * @category constructors |
| 897 | * @since 4.0.0 |
| 898 | */ |
| 899 | const PgJson = Statement.custom<PgJson>("PgJson") |
| 900 | |
| 901 | const ATTR_DB_SYSTEM_NAME = "db.system.name" |
| 902 | const ATTR_DB_NAMESPACE = "db.namespace" |
| 903 | const ATTR_SERVER_ADDRESS = "server.address" |
| 904 | const ATTR_SERVER_PORT = "server.port" |
| 905 | |
| 906 | const pgCodeFromCause = (cause: unknown): string | undefined => { |
| 907 | if (typeof cause !== "object" || cause === null || !("code" in cause)) { |
| 908 | return undefined |
| 909 | } |
| 910 | const code = cause.code |
| 911 | return typeof code === "string" ? code : undefined |
no outgoing calls
no test coverage detected
searching dependent graphs…