Keeping the values a database driver quotes out of what is logged, traced and reported (BOU-626, BOU-628, BOU-629). Pure, on the driver's SQLState, vendor code and message: every library reporting through observability gets it, whatever threw (BOU-633).
Keeping the values a database driver quotes out of what is logged, traced and reported (BOU-626, BOU-628, BOU-629). Pure, on the driver's SQLState, vendor code and message: every library reporting through observability gets it, whatever threw (BOU-633).
(column->field s)The one column s names as a kebab keyword, or nil for several columns or
anything that is not a plain identifier: the rest may be SQL or a value.
The one column `s` names as a kebab keyword, or nil for several columns or anything that is not a plain identifier: the rest may be SQL or a value.
(constraint-name {:keys [message constraint authored?]})The constraint or index the driver says refused the write, or nil. The name
only, never the values beside it, so it can be logged. PostgreSQL's
:constraint, in any language, before its message. Nil for a RAISE, whose
names are its author's text.
The constraint or index the driver says refused the write, or nil. The name only, never the values beside it, so it can be logged. PostgreSQL's `:constraint`, in any language, before its message. Nil for a RAISE, whose names are its author's text.
(first-sql-exception e)The first SQLException in e's causes, or nil.
The first SQLException in `e`'s causes, or nil.
(loggable-message e)e's message, or a summary without the values when the driver's quotes them.
`e`'s message, or a summary without the values when the driver's quotes them.
(not-null-field {:keys [sql-state error-code message column authored?]})The field a refused NOT NULL names, as a kebab keyword, or nil when
reported is not one. Read only when the state or code says NOT NULL, or
there is no state (SQLite): other messages quote values a pattern could match.
PostgreSQL's :column, in any language, before its message.
The field a refused NOT NULL names, as a kebab keyword, or nil when `reported` is not one. Read only when the state or code says NOT NULL, or there is no state (SQLite): other messages quote values a pattern could match. PostgreSQL's `:column`, in any language, before its message.
(redacted-exception t)t, or a copy in which each SQLException that quotes the values sent says
what redacted-message says instead, for an error reporter or log: its
causes and what is suppressed on them alike (BOU-630, BOU-635). Same
messages, data and stack otherwise. A driver subclass becomes a
SQLException naming it; a cause that is neither that nor ex-info, a
RuntimeException naming its class.
`t`, or a copy in which each SQLException that quotes the values sent says what `redacted-message` says instead, for an error reporter or log: its causes and what is suppressed on them alike (BOU-630, BOU-635). Same messages, data and stack otherwise. A driver subclass becomes a SQLException naming it; a cause that is neither that nor ex-info, a RuntimeException naming its class.
(redacted-message {:keys [sql-state error-code message authored?] :as reported})What to log in place of the driver's message, or nil when that can be
logged as is. Redacted unless its SQLState is known to quote no values, or
it has none (SQLite, whose messages name only columns): data and integrity
errors quote what was sent (BOU-626), and so may MySQL's HY000 or a
PostgreSQL trigger's RAISE (BOU-629). Names, which hold no values, are kept.
A RAISE (:authored?) is redacted whatever SQLState it claims, names and
all: they are its author's text (BOU-635).
What to log in place of the driver's message, or nil when that can be logged as is. Redacted unless its SQLState is known to quote no values, or it has none (SQLite, whose messages name only columns): data and integrity errors quote what was sent (BOU-626), and so may MySQL's HY000 or a PostgreSQL trigger's RAISE (BOU-629). Names, which hold no values, are kept. A RAISE (`:authored?`) is redacted whatever SQLState it claims, names and all: they are its author's text (BOU-635).
(reported e)What the driver said, from the first SQLException in e's causes, or nil.
:message and :detail may quote the values sent: parse them, do not log them.
What the driver said, from the first SQLException in `e`'s causes, or nil. `:message` and `:detail` may quote the values sent: parse them, do not log them.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |