com.alpine.sql

SQLGenerator

trait SQLGenerator extends AnyRef

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

Abstract Value Members

  1. abstract def dbType: TypeValue

    Returns the DatabaseType.

    Returns the DatabaseType.TypeValue object that represents the database type.

    returns

  2. abstract def getCreateTableAsSelectSQL(columns: String, sourceTable: String, destinationTable: String): String

    Returns a SQL DDL statement to generate a table based on a SELECT query from an existing table.

    Returns a SQL DDL statement to generate a table based on a SELECT query from an existing table. For most databases, this is something like "CREATE TABLE destinationTable AS SELECT columns FROM sourceTable"

    columns
    sourceTable
    destinationTable

  3. abstract def getCreateTableAsSelectSQL(columns: String, sourceTable: String, destinationTable: String, whereClause: String): String

    Returns a SQL DDL statement to generate a table based on a SELECT query from an existing table.

    Returns a SQL DDL statement to generate a table based on a SELECT query from an existing table. For most databases, this is something like "CREATE TABLE destinationTable AS SELECT columns FROM sourceTable whereClause"

    columns
    sourceTable
    destinationTable
    whereClause

  4. abstract def getCreateTableOrViewAsSelectSQL(columns: String, sourceTable: String, destinationTable: String, isView: Boolean): String

    Returns a SQL DDL statement to generate a table or view based on a SELECT query from an existing table.

    Returns a SQL DDL statement to generate a table or view based on a SELECT query from an existing table. For most databases, this is something like "CREATE TABLE destinationTable AS SELECT columns FROM sourceTable" or "CREATE VIEW destinationTable AS SELECT columns FROM sourceTable", depending on the isView parameter

    columns
    sourceTable
    destinationTable
    isView

  5. abstract def getCreateTableOrViewAsSelectSQL(columns: String, sourceTable: String, destinationTable: String, whereClause: String, isView: Boolean): String

    Returns a SQL DDL statement to generate a table or view based on a SELECT query from an existing table.

    Returns a SQL DDL statement to generate a table or view based on a SELECT query from an existing table. For most databases, this is something like "CREATE TABLE destinationTable AS SELECT columns FROM sourceTable whereClause" or "CREATE VIEW destinationTable AS SELECT columns FROM sourceTable whereClause", depending on the isView parameter

    columns
    sourceTable
    destinationTable
    whereClause
    isView

  6. abstract def getCreateViewAsSelectSQL(columns: String, sourceTable: String, destinationView: String): String

    Returns a SQL DDL statement to generate a view based on a SELECT query from an existing table.

    Returns a SQL DDL statement to generate a view based on a SELECT query from an existing table. For most databases, this is something like "CREATE VIEW destinationTable AS SELECT columns FROM sourceTable"

    columns
    sourceTable
    destinationView

  7. abstract def getCreateViewAsSelectSQL(columns: String, sourceTable: String, destinationView: String, whereClause: String): String

    Returns a SQL DDL statement to generate a view based on a SELECT query from an existing table.

    Returns a SQL DDL statement to generate a view based on a SELECT query from an existing table. For most databases, this is something like "CREATE VIEW destinationTable AS SELECT columns FROM sourceTable [whereClause]"

    columns
    sourceTable
    destinationView
    whereClause

  8. abstract def getDropTableIfExistsSQL(tableName: String, cascade: Boolean = false): String

    Returns a SQL DDL statement to drop a table if it exists, and optionally, cascade the drop to dependent tables.

    Returns a SQL DDL statement to drop a table if it exists, and optionally, cascade the drop to dependent tables. For most databases, this is something like "DROP TABLE IF EXISTS tableName [CASCADE]"

    tableName
    cascade
    returns

  9. abstract def getDropViewIfExistsSQL(viewName: String, cascade: Boolean = false): String

    Returns a SQL DDL statement to drop a view if it exists, and optionally, cascade the drop to dependent views.

    Returns a SQL DDL statement to drop a view if it exists, and optionally, cascade the drop to dependent views. For most databases, this is something like "DROP VIEW IF EXISTS viewName [CASCADE]"

    viewName
    cascade
    returns

  10. abstract def getModuloExpression(dividend: String, divisor: String): String

    Returns the expression for modulo division for this database.

    Returns the expression for modulo division for this database. This differs widely among databases. For example, in PostgreSQL, this is "dividend % divisor". But in Oracle, this is "MODULO(dividend, divisor)". For this reason, we must pass in the expressions used for dividend and divisor.

    returns

  11. abstract def getStandardDeviationFunctionName: String

    Returns the name of the standard deviation function to be used for this database.

    Returns the name of the standard deviation function to be used for this database. For example, in PostgreSQL, this is "stddev". Note that this is just the function name, and does not include the argument. A typical call would be "stddev(expression)".

    returns

  12. abstract def getVarianceFunctionName: String

    Returns the name of the variance function to be used for this database.

    Returns the name of the variance function to be used for this database. For example, in PostgreSQL, this is "variance". Note that this is just the function name, and does not include the argument. A typical call would be "variance(expression)".

    returns

  13. abstract def quoteChar: String

    Character or String to use when quoting identifiers.

    Character or String to use when quoting identifiers. Typically, this is a double-quote (for PostgreSQL and other databases), but can be other characters or even Strings for other platforms.

    returns

  14. abstract def quoteIdentifier(s: String): String

    Wraps an identifier in the appropriate quote character to preserve case and special characters.

    Wraps an identifier in the appropriate quote character to preserve case and special characters. If there is no quoting mechanism for this database type, just return the argument.

    s

    identifier name to be quoted

    returns

  15. abstract def quoteObjectName(schemaName: String, objectName: String): String

    Wraps a schema and table or view name in the appropriate quote character to preserve case and special characters.

    Wraps a schema and table or view name in the appropriate quote character to preserve case and special characters. If schemaName is unspecified, quote only the objectName. Uses quoteIdentifier() for quoting.

    schemaName
    objectName
    returns

  16. abstract def useAliasForSelectSubQueries: Boolean

    If true, subqueries must be aliased.

    If true, subqueries must be aliased.

    returns

  17. abstract def escapeColumnName(s: String): String

    Wraps a column name in the appropriate quote character to preserve case and special characters.

    Wraps a column name in the appropriate quote character to preserve case and special characters. If there is no quoting mechanism for this database type, just return the argument. Note: Deprecated -- please use quoteIdentifier instead.

    s

    name to be escaped.

    returns

    Annotations
    @deprecated
    Deprecated

    (Since version 2016-04-22) Please use quoteIdentifier instead [Paul]

Concrete 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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

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

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

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped