Uses of Class
com.google.mu.safesql.SafeSql
-
Uses of SafeSql in com.google.mu.safesql
Modifier and TypeMethodDescriptionstatic SafeSql
SafeSql.nonNegativeLiteral
(int number) Wraps non-negativenumber
as a literal SQL snippet in a SafeSql object.static SafeSql
static SafeSql
SafeSql.optionally
(String query, Optional<?> param) An optional query that's only rendered ifparam
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 SafeSql 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.static SafeSql
An optional query that's only rendered ifcondition
is true; otherwise returnsEMPTY
.Modifier and TypeMethodDescriptionSafeSql.and()
A collector that joins boolean query snippet usingAND
operator.SafeSql.and()
A collector that joins boolean query snippet usingAND
operator.Returns a collector that joins SafeSql elements usingdelimiter
.Returns a collector that joins SafeSql elements usingdelimiter
.SafeSql.or()
A collector that joins boolean query snippet usingOR
operator.SafeSql.or()
A collector that joins boolean query snippet usingOR
operator.static StringFormat.Template
<SafeSql> 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.