(* & exprs)
Math operator. Interpose *
between exprs
and wrap in parentheses.
Math operator. Interpose `*` between `exprs` and wrap in parentheses.
(+ & exprs)
Math operator. Interpose +
between exprs
and wrap in parentheses.
Math operator. Interpose `+` between `exprs` and wrap in parentheses.
(- & exprs)
Math operator. Interpose -
between exprs
and wrap in parentheses.
Math operator. Interpose `-` between `exprs` and wrap in parentheses.
(->boolean x)
CAST x
to a boolean
datatype
CAST `x` to a `boolean` datatype
(->timestamp-with-time-zone x)
CAST x
to a timestamp with time zone
.
CAST `x` to a `timestamp with time zone`.
(/ & exprs)
Math operator. Interpose /
between exprs
and wrap in parentheses.
Math operator. Interpose `/` between `exprs` and wrap in parentheses.
(cast c x)
Generate a statement like cast(x AS c)
.
Generate a statement like `cast(x AS c)`.
(identifier identifier-type & components)
Inputs: [identifier-type :- IdentifierType & components] Returns: Identifier
Define an identifer of type with components
. Prefer this to using keywords for identifiers, as those do not
properly handle identifiers with slashes in them.
identifier-type
represents the type of identifier in question, which is important context for some drivers, such
as BigQuery (which needs to qualify Tables identifiers with their dataset name.)
This function automatically unnests any Identifiers passed as arguments, removes nils, and converts all args to strings.
Inputs: [identifier-type :- IdentifierType & components] Returns: Identifier Define an identifer of type with `components`. Prefer this to using keywords for identifiers, as those do not properly handle identifiers with slashes in them. `identifier-type` represents the type of identifier in question, which is important context for some drivers, such as BigQuery (which needs to qualify Tables identifiers with their dataset name.) This function automatically unnests any Identifiers passed as arguments, removes nils, and converts all args to strings.
Schema for valid Identifier types.
Schema for valid Identifier types.
(literal s)
Wrap keyword or string s
in single quotes and a HoneySQL raw
form.
We'll try to escape single quotes in the literal, unless they're already escaped (either as ''
or as \
, but
this won't handle wacky cases like three single quotes in a row. Don't use literal
for things that might be wacky.
Only use it for things that are hardcoded.
Wrap keyword or string `s` in single quotes and a HoneySQL `raw` form. We'll try to escape single quotes in the literal, unless they're already escaped (either as `''` or as `\`, but this won't handle wacky cases like three single quotes in a row. Don't use `literal` for things that might be wacky. Only use it for things that are hardcoded.
(mod & exprs)
Math operator. Interpose %
between exprs
and wrap in parentheses.
Math operator. Interpose `%` between `exprs` and wrap in parentheses.
(quoted-cast c x)
Generate a statement like cast(x AS "c")
.
Like cast
but quotes the type C. This is useful for cases where we deal with user-defined types or other types
that may have a space in the name, for example Postgres enum types.
Generate a statement like `cast(x AS "c")`. Like `cast` but quotes the type C. This is useful for cases where we deal with user-defined types or other types that may have a space in the name, for example Postgres enum types.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close