Adds a Catalyst org.apache.spark.sql.catalyst.expressions.Expression to this SQLBuilder
Adds a Catalyst org.apache.spark.sql.catalyst.expressions.Expression to this SQLBuilder
The org.apache.spark.sql.catalyst.expressions.Expression to add
Adds a list of expressions to this SQLBuilder, joins each expression with the provided conjunction.
Adds a list of expressions to this SQLBuilder, joins each expression with the provided conjunction.
A list of org.apache.spark.sql.catalyst.expressions.Expressions
A string to join the resulting SQL Expressions with
Add a list of params directly to the internal params list.
Add a list of params directly to the internal params list. Optimized form of calling SQLBuilder#param(Any) for each element of newParams.
SQLBuilder#aliasedBlock(String, SQLBuilder => Unit)
Wraps the provided lambda with a non-qualified alias.
Wraps the provided lambda with a non-qualified alias.
The alias to give the inner expression
A lambda which will be wrapped with ( ... ) AS alias
Appends another SQLBuilder to this one.
Appends another SQLBuilder to this one.
The other SQLBuilder
This SQLBuilder
Adds a named expression to the builder.
Adds a named expression to the builder.
The expression is fully qualified if possible (ex. foo
.bar
)
Attempts to lookup the expression in SQLBuilder#fields
if it exists.
Wraps the provided lambda in parentheses.
Wraps the provided lambda in parentheses.
A lambda which will be executed between adding parenthesis to the expression
Escapes and appends a single identifier to the SQLBuilder.
Appends another SQLBuilder to this one.
Appends another SQLBuilder to this one.
The other SQLBuilder
A string to append to this SQLBuilder if other is None
This SQLBuilder
Handles converting the literal from its Catalyst Type to a Scala Type
SQLBuilder#param(Any)
Use this variant if the parameter is one of the Catalyst Types
SQLBuilder#param(Any)
Adds the provided param to the internal params list.
Adds a list of elements to the SQL expression, as a comma-delimited list.
Adds a list of elements to the SQL expression, as a comma-delimited list. Handles updating the expression as well as adding each param to the internal params list.
A list of objects to add to the expression
The Catalyst type for all of the objects
A String attribute optionally qualified by another string.
SQLBuilder#raw(String)
Adds a raw string to the expression, no escaping occurs.
SQLBuilder is a mutable object for efficiently building up complex SQL expressions. Internally it uses StringBuilder and a ListBuffer to efficiently support many small writes. All methods return
this
for chaining.