Evaluates CHECK expression data against a row the way PostgreSQL does: nil is NULL, comparisons and functions yield nil when an operand is nil, and a CHECK passes unless its result is false. AND, OR and COALESCE stop at the first decisive operand, left to right. An expression PostgreSQL would fail on (division by zero, a cast that does not parse) fails the row, since the database would reject it too. Rows hold the registry's types (java.time, UUID, jsonb as maps and vectors).
Only the vocabulary that occurs in CHECK constraints is implemented; supported? tells whether an expression is inside it, and render leaves the others unrendered.
Evaluates CHECK expression data against a row the way PostgreSQL does: nil is NULL, comparisons and functions yield nil when an operand is nil, and a CHECK passes unless its result is false. AND, OR and COALESCE stop at the first decisive operand, left to right. An expression PostgreSQL would fail on (division by zero, a cast that does not parse) fails the row, since the database would reject it too. Rows hold the registry's types (java.time, UUID, jsonb as maps and vectors). Only the vocabulary that occurs in CHECK constraints is implemented; supported? tells whether an expression is inside it, and render leaves the others unrendered.
(backtracking-regex re)like-regex's output without its atomic groups, which test.chuck and joined-regex do not read: the same strings, as [\s\S]* between the parts.
like-regex's output without its atomic groups, which test.chuck and joined-regex do not read: the same strings, as [\s\S]* between the parts.
(case-insensitive re)A Java regex matching regardless of case, of every letter as in the database (~*, ILIKE).
A Java regex matching regardless of case, of every letter as in the database (~*, ILIKE).
(checker e)(checker e types)Row predicate of a CHECK expression: true when the result is true or NULL, as in PostgreSQL. types are the columns' types as column-type gives them ({:n :integer :c [:character 4]}).
Row predicate of a CHECK expression: true when the result is true or NULL, as in PostgreSQL.
types are the columns' types as column-type gives them ({:n :integer :c [:character 4]}).(column-type {:keys [pg/type pg/max-length]})The type the evaluator reads for a column, from its schema's properties (:pg/type, and :pg/max-length, a char(n)'s n): an integer or char(n) type; :real, whose value PostgreSQL stores in single precision before its CHECKs read it; :unordered for a type pgmalli has no entry for (an enum, whose order is its labels', or a domain); nil for the others.
The type the evaluator reads for a column, from its schema's properties (:pg/type, and :pg/max-length, a char(n)'s n): an integer or char(n) type; :real, whose value PostgreSQL stores in single precision before its CHECKs read it; :unordered for a type pgmalli has no entry for (an enum, whose order is its labels', or a domain); nil for the others.
(float4? d)Whether a double fits a real: single precision neither overflows to infinity nor underflows to zero, where PostgreSQL rejects the value.
Whether a double fits a real: single precision neither overflows to infinity nor underflows to zero, where PostgreSQL rejects the value.
(fold-casts e)The expression with its casts of number literals to number types done: (2.5)::integer is 3.
The expression with its casts of number literals to number types done: (2.5)::integer is 3.
(generation-regex re)The regex a string generator reads, from java-regex's (case-insensitive or not): its strings match the regex given. Without the flags and \z, which test.chuck refuses; classes as their ASCII members alone (which every server's classes have); any character a printable ASCII one; a case-insensitive one's letters as [aA]; repeats at most 4 more than their least.
The regex a string generator reads, from java-regex's (case-insensitive or not): its strings match the regex given. Without the flags and \z, which test.chuck refuses; classes as their ASCII members alone (which every server's classes have); any character a printable ASCII one; a case-insensitive one's letters as [aA]; repeats at most 4 more than their least.
(integer-digits d)Digits before the point, read off precision and scale; 0 or less when |d| < 1, and fewer than any bound for a zero (0E+30's precision and scale say 31).
Digits before the point, read off precision and scale; 0 or less when |d| < 1, and fewer than any bound for a zero (0E+30's precision and scale say 31).
(java-regex re)The Java regex a value PostgreSQL's pattern may match matches (see regex-forms); nil when the pattern has syntax Java reads differently.
The Java regex a value PostgreSQL's pattern may match matches (see regex-forms); nil when the pattern has syntax Java reads differently.
The anchored Java regex of a LIKE pattern (backslash escapes % and _), memoized as java-regex is. The text between two %s is fixed-length, so its first occurrence is the one to take: an atomic group commits to it, which keeps matching linear where [\s\S]* between them backtracks polynomially ('%a%a%a%b' on a long value).
The anchored Java regex of a LIKE pattern (backslash escapes % and _), memoized as java-regex is.
The text between two %s is fixed-length, so its first occurrence is the one to take: an atomic
group commits to it, which keeps matching linear where [\s\S]* between them backtracks
polynomially ('%a%a%a%b' on a long value).(rounded d scale)d at scale places, half up; a d too small to reach them is zero, without the division.
d at scale places, half up; a d too small to reach them is zero, without the division.
(strict-regex re)The Java regex java-regex gives, its classes without the non-ASCII characters: a string it matches PostgreSQL's pattern matches on any server.
The Java regex java-regex gives, its classes without the non-ASCII characters: a string it matches PostgreSQL's pattern matches on any server.
(supported? e)(supported? e types)Whether every operator, cast and pattern in the expression is implemented; types are the schema's enum and domain names, whose literals are values as they are.
Whether every operator, cast and pattern in the expression is implemented; types are the schema's enum and domain names, whose literals are values as they are.
(unknowable? e row types)Whether the row's verdict depends on what the evaluator does not know, so checker passes it.
Whether the row's verdict depends on what the evaluator does not know, so checker passes it.
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 |