com.memsql.spark.pushdown

SQLBuilder

class SQLBuilder extends AnyRef

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SQLBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SQLBuilder(fields: Seq[NamedExpression] = immutable.this.Nil)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def addExpression(expression: Expression): SQLBuilder

    Adds a Catalyst org.apache.spark.sql.catalyst.expressions.Expression to this SQLBuilder

  7. def addExpressions(expressions: Seq[Expression], conjunction: String): SQLBuilder

    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.

    expressions

    A list of org.apache.spark.sql.catalyst.expressions.Expressions

    conjunction

    A string to join the resulting SQL Expressions with

  8. def addParams(newParams: Seq[Any]): SQLBuilder

    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.

  9. def aliasedBlock(alias: QueryAlias, inner: (SQLBuilder) ⇒ Unit): SQLBuilder

    See also

    SQLBuilder#aliasedBlock(String, SQLBuilder => Unit)

  10. def aliasedBlock(alias: String, inner: (SQLBuilder) ⇒ Unit): SQLBuilder

    Wraps the provided lambda with a non-qualified alias.

    Wraps the provided lambda with a non-qualified alias.

    alias

    The alias to give the inner expression

    inner

    A lambda which will be wrapped with ( ... ) AS alias

  11. def appendBuilder(other: SQLBuilder): SQLBuilder

    Appends another SQLBuilder to this one.

    Appends another SQLBuilder to this one.

    other

    The other SQLBuilder

    returns

    This SQLBuilder

  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def attr(a: Attribute): SQLBuilder

    Adds a named expression to the builder.

    Adds a named expression to the builder.

    Note

    The expression is fully qualified if possible (ex. foo.bar)

    ,

    Attempts to lookup the expression in SQLBuilder#fields if it exists.

  14. def block(inner: ⇒ Unit): SQLBuilder

    Wraps the provided lambda in parentheses.

    Wraps the provided lambda in parentheses.

    inner

    A lambda which will be executed between adding parenthesis to the expression

  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def identifier(a: String): SQLBuilder

    Escapes and appends a single identifier to the SQLBuilder.

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def maybeAddExpressions(expressions: Seq[Expression], conjunction: String): Option[SQLBuilder]

  24. def maybeAppendBuilder(other: Option[SQLBuilder], ifNone: String = ""): SQLBuilder

    Appends another SQLBuilder to this one.

    Appends another SQLBuilder to this one.

    other

    The other SQLBuilder

    ifNone

    A string to append to this SQLBuilder if other is None

    returns

    This SQLBuilder

  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. def param(l: Literal): SQLBuilder

    Note

    Handles converting the literal from its Catalyst Type to a Scala Type

    See also

    SQLBuilder#param(Any)

  29. def param(p: Any, t: DataType): SQLBuilder

    Note

    Use this variant if the parameter is one of the Catalyst Types

    See also

    SQLBuilder#param(Any)

  30. def param(p: Any): SQLBuilder

    Adds the provided param to the internal params list.

  31. def paramList(newParams: Seq[Any], t: DataType): SQLBuilder

    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.

    newParams

    A list of objects to add to the expression

    t

    The Catalyst type for all of the objects

  32. var params: ListBuffer[Any]

  33. def qualifiedAttr(qualifier: Option[String], name: String): SQLBuilder

    A String attribute optionally qualified by another string.

  34. def raw(s: StringBuilder): SQLBuilder

    See also

    SQLBuilder#raw(String)

  35. def raw(s: String): SQLBuilder

    Adds a raw string to the expression, no escaping occurs.

  36. var sql: StringBuilder

  37. def sqlFunction(fnName: String, children: Expression*): SQLBuilder

  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped