Uses of Annotation Interface
com.google.mu.annotations.TemplateFormatMethod
Packages that use TemplateFormatMethod
Package
Description
BigQuery Client Library (requires mug-bigquery artifact)
GoogleSql, SafeQuery
StringFormat, Substring, Optionals and more...
-
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 SafeQuery
Much likeSafeQuery.of(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 SafeSql
static SafeQuery
SafeQuery.optionally
(String query, Optional<?> arg) An optional query that's only rendered ifarg
is present; otherwise returnsSafeQuery.EMPTY
.static SafeSql
SafeSql.optionally
(String query, Optional<?> param) An optional query that's only rendered ifparam
is present; otherwise returnsSafeSql.EMPTY
.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
.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 SafeQuery
An optional query that's only rendered ifcondition
is true; otherwise returnsSafeQuery.EMPTY
.static SafeSql
An optional query that's only rendered ifcondition
is true; otherwise returnsSafeSql.EMPTY
. -
Uses of TemplateFormatMethod in com.google.mu.util
Methods in com.google.mu.util with annotations of type TemplateFormatMethod