Uses of Annotation Interface
com.google.mu.annotations.TemplateFormatMethod
Packages that use TemplateFormatMethod
Package
Description
Deprecated (requires mug-guava artifact)
BigQuery Client Library (requires mug-bigquery artifact)
Injection-safe SQL template (requires mug-safesql artifact)
Injection-safe template for Cloud Spanner (requires mug-spanner artifact)
StringFormat, Substring, Optionals and more...
-
Uses of TemplateFormatMethod in com.google.guava.labs.safesql
Methods in com.google.guava.labs.safesql with annotations of type TemplateFormatMethodModifier and TypeMethodDescriptionstatic SafeQuery
Deprecated.Much likeSafeQuery.of(java.lang.String, java.lang.Object...)
, but with additional GoogleSQL translation rules.static SafeQuery
Deprecated.Returns a query using a constant query template filled withargs
.static SafeQuery
SafeQuery.optionally
(String query, Optional<?> arg) Deprecated.An optional query that's only rendered ifarg
is present; otherwise returnsSafeQuery.EMPTY
.Deprecated.Ifthis
query is empty (likely from a call toSafeQuery.optionally(java.lang.String, java.util.Optional<?>)
orSafeQuery.when(boolean, java.lang.String, java.lang.Object...)
), returns the SafeQuery produced from thefallback
template andargs
.static SafeQuery
Deprecated.An optional query that's only rendered ifcondition
is true; otherwise returnsSafeQuery.EMPTY
. -
Uses of TemplateFormatMethod in com.google.mu.bigquery
Methods in com.google.mu.bigquery with annotations of type TemplateFormatMethodModifier and TypeMethodDescriptionstatic ParameterizedQuery
Convenience method when you need to create theParameterizedQuery
inline, with both the query template and the arguments.static ParameterizedQuery
ParameterizedQuery.optionally
(String query, Optional<?> arg) An optional query that's only rendered ifarg
is present; otherwise returnsParameterizedQuery.EMPTY
. -
Uses of TemplateFormatMethod in com.google.mu.safesql
Methods in com.google.mu.safesql with annotations of type TemplateFormatMethodModifier and TypeMethodDescriptionstatic SafeSql
static SafeSql
SafeSql.optionally
(String query, Optional<?> param) Deprecated.Ifthis
query is empty (likely from a call toSafeSql.optionally(java.lang.String, java.util.Optional<?>)
orSafeSql.when(boolean, java.lang.String, java.lang.Object...)
), returns the SafeSql produced from thefallback
template andargs
.static SafeSql
An optional query that's only rendered ifcondition
is true; otherwise returnsSafeSql.EMPTY
. -
Uses of TemplateFormatMethod in com.google.mu.spanner
Methods in com.google.mu.spanner with annotations of type TemplateFormatMethodModifier and TypeMethodDescriptionstatic ParameterizedQuery
Ifthis
query is empty (likely from a call toParameterizedQuery.when(boolean, java.lang.String, java.lang.Object...)
), returns the ParameterizedQuery produced from thefallback
template andargs
.static ParameterizedQuery
An optional query that's only rendered ifcondition
is true; otherwise returnsParameterizedQuery.EMPTY
. -
Uses of TemplateFormatMethod in com.google.mu.util
Methods in com.google.mu.util with annotations of type TemplateFormatMethod
SafeSql.of("{foo? -> OR foo?}", optionalFoo)
instead ofoptionally("or {foo}", optionalFoo)
because the former allows you to referencefoo?
multiple times in the right hand side snippet.