Uses of Annotation Interface
com.google.mu.annotations.TemplateString
Package
Description
BigQuery Client Library (requires mug-bigquery artifact)
GoogleSql, SafeQuery
StringFormat, Substring, Optionals and more...
-
Uses of TemplateString in com.google.mu.bigquery
Modifier 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 TemplateString in com.google.mu.safesql
Modifier 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 TemplateString in com.google.mu.util