Uses of Class
com.google.mu.safesql.SafeQuery
-
Uses of SafeQuery in com.google.mu.safesql
Modifier and TypeMethodDescriptionstatic SafeQuery
Much likeof(java.lang.String, java.lang.Object...)
, but with additional GoogleSQL translation rules.static SafeQuery
Returns a query using a constant query template filled withargs
.static SafeQuery
SafeQuery.optionally
(String query, Optional<?> arg) An optional query that's only rendered ifarg
is present; otherwise returnsEMPTY
.Ifthis
query is empty (likely from a call tooptionally(java.lang.String, java.util.Optional<?>)
orwhen(boolean, java.lang.String, java.lang.Object...)
), returns thefallback
query.Ifthis
query is empty (likely from a call tooptionally(java.lang.String, java.util.Optional<?>)
orwhen(boolean, java.lang.String, java.lang.Object...)
), returns the SafeQuery produced from thefallback
template andargs
.Ifthis
query is empty (likely from a call tooptionally(java.lang.String, java.util.Optional<?>)
orwhen(boolean, java.lang.String, java.lang.Object...)
), returns the query produced by thefallback
supplier.protected SafeQuery
SafeQuery.Translator.translateLiteral
(Substring.Match placeholder, Object value) Called if a placeholdervalue
is a non-string, non-Iterable literal appearing unquoted in the template.static SafeQuery
An optional query that's only rendered ifcondition
is true; otherwise returnsEMPTY
.Modifier and TypeMethodDescriptionSafeQuery.and()
A collector that joins boolean query snippets usingAND
operator.SafeQuery.and()
A collector that joins boolean query snippets usingAND
operator.Returns a collector that can joinSafeQuery
objects usingdelim
as the delimiter.Returns a collector that can joinSafeQuery
objects usingdelim
as the delimiter.SafeQuery.or()
A collector that joins boolean query snippets usingOR
operator.SafeQuery.or()
A collector that joins boolean query snippets usingOR
operator.static StringFormat.Template
<SafeQuery> Much liketemplate(java.lang.String)
, but with additional GoogleSQL translation rules.static StringFormat.Template
<SafeQuery> Creates a template with the placeholders to be filled by subsequentStringFormat.Template.with(java.lang.Object...)
calls.final StringFormat.Template
<SafeQuery> Translatestemplate
to a factory ofSafeQuery
by filling the provided parameters in the places of corresponding placeholders.Modifier and TypeMethodDescriptionIfthis
query is empty (likely from a call tooptionally(java.lang.String, java.util.Optional<?>)
orwhen(boolean, java.lang.String, java.lang.Object...)
), returns thefallback
query.Modifier and TypeMethodDescriptionIfthis
query is empty (likely from a call tooptionally(java.lang.String, java.util.Optional<?>)
orwhen(boolean, java.lang.String, java.lang.Object...)
), returns the query produced by thefallback
supplier.