case class CreateTable(tableName: String, columns: List[Column], tableConstraints: Set[TableConstraint] = Set.empty[TableConstraint], tableAttributes: Set[TableAttribute] = Set.empty[TableAttribute]) extends Statement with Product with Serializable
Class holding all information about Redshift's table
- tableName
table_name
- columns
iterable of all columns DDLs
- tableConstraints
set of table_constraints such as PRIMARY KEY
- tableAttributes
set of table_attributes such as DISTSTYLE
- Alphabetic
- By Inheritance
- CreateTable
- Statement
- Serializable
- Serializable
- Product
- Equals
- Ddl
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
CreateTable(tableName: String, columns: List[Column], tableConstraints: Set[TableConstraint] = Set.empty[TableConstraint], tableAttributes: Set[TableAttribute] = Set.empty[TableAttribute])
- tableName
table_name
- columns
iterable of all columns DDLs
- tableConstraints
set of table_constraints such as PRIMARY KEY
- tableAttributes
set of table_attributes such as DISTSTYLE
Value Members
- val columns: List[Column]
-
def
render: String
Properly render statement with separator Use it instead
toDdl
on Statement objectsProperly render statement with separator Use it instead
toDdl
on Statement objects- Definition Classes
- Statement
-
val
separator: String
Symbol used to separate statement from other.
Symbol used to separate statement from other. Usually it is a semicolon, however special statements, like empty line or comment don't use separators Container class (not Statement) handles separators as well as newlines
- Definition Classes
- Statement
- val tableAttributes: Set[TableAttribute]
- val tableConstraints: Set[TableConstraint]
- val tableName: String
-
def
toDdl: String
Output actual DDL as string
-
val
warnings: List[String]
Aggregates all warnings from child elements
Aggregates all warnings from child elements
- Definition Classes
- CreateTable → Ddl
-
def
withTabs(spaces: Int, str: String): String
Append specified amount of
to the string to produce formatted DDLspaces
Append specified amount of
to the string to produce formatted DDLspaces
- spaces
amount of spaces
- str
string itself
- returns
string with spaces
- Definition Classes
- Ddl