Package

com.snowplowanalytics.iglu.schemaddl

redshift

Permalink

package redshift

Visibility
  1. Public
  2. All

Type Members

  1. case class AddColumn(columnName: String, columnType: DataType, default: Option[Default], encode: Option[CompressionEncoding], nullability: Option[Nullability]) extends AlterTableStatement with Product with Serializable

    Permalink
  2. case class AddConstraint(tableConstraint: TableConstraint) extends AlterTableStatement with Product with Serializable

    Permalink
  3. case class AlterTable(tableName: String, statement: AlterTableStatement) extends Statement with Product with Serializable

    Permalink

    Class holding data to alter some table with single AlterTableStatement

    Class holding data to alter some table with single AlterTableStatement

    See also

    http://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html ALTER TABLE table_name { ADD table_constraint | DROP CONSTRAINT constraint_name [ RESTRICT | CASCADE ] | OWNER TO new_owner | RENAME TO new_name | RENAME COLUMN column_name TO new_name | ADD [ COLUMN ] column_name column_type [ DEFAULT default_expr ] [ ENCODE encoding ] [ NOT NULL | NULL ] | DROP [ COLUMN ] column_name [ RESTRICT | CASCADE ] } where table_constraint is: [ CONSTRAINT constraint_name ] { UNIQUE ( column_name [, ... ] ) | PRIMARY KEY ( column_name [, ... ] ) | FOREIGN KEY (column_name [, ... ] ) REFERENCES reftable [ ( refcolumn ) ]}

  4. sealed trait AlterTableStatement extends Ddl

    Permalink

    Sum-type to represent some statement

  5. case class Begin(isolationLevel: Option[IsolationLevel.type], permission: Option[Permission]) extends Statement with Product with Serializable

    Permalink
  6. case class Column(columnName: String, dataType: DataType, columnAttributes: Set[ColumnAttribute] = Set.empty[ColumnAttribute], columnConstraints: Set[ColumnConstraint] = Set.empty[ColumnConstraint]) extends Ddl with Product with Serializable

    Permalink

    Class holding all information about Redshift's column

    Class holding all information about Redshift's column

    columnName

    column_name

    dataType

    data_type such as INTEGER, VARCHAR, etc

    columnAttributes

    set of column_attributes such as ENCODE

    columnConstraints

    set of column_constraints such as NOT NULL

  7. sealed trait ColumnAttribute extends Ddl

    Permalink

    column_attributes are: [ DEFAULT default_expr ] [ IDENTITY ( seed, step ) ] [ ENCODE encoding ] [ DISTKEY ] [ SORTKEY ]

  8. sealed trait ColumnConstraint extends Ddl

    Permalink

    column_constraints are: [ { NOT NULL | NULL } ] [ { UNIQUE | PRIMARY KEY } ] [ REFERENCES reftable [ ( refcolumn ) ] ]

  9. case class CommentBlock(lines: Vector[String], prepend: Int = 0) extends Statement with Product with Serializable

    Permalink

    Class representing comment block in Ddl file Can be rendered into file along with other Ddl-statements

    Class representing comment block in Ddl file Can be rendered into file along with other Ddl-statements

    lines

    sequence of lines

    prepend

    optional amount of spaces to prepend delimiter (--)

  10. case class CommentOn(tableName: String, comment: String) extends Statement with Product with Serializable

    Permalink

    COMMENT ON { TABLE object_name | COLUMN object_name.column_name | CONSTRAINT constraint_name ON table_name | DATABASE object_name | VIEW object_name } IS 'text'

  11. case class CompressionEncoding(value: CompressionEncodingValue) extends ColumnAttribute with Product with Serializable

    Permalink

    Compression encodings http://docs.aws.amazon.com/redshift/latest/dg/c_Compression_encodings.html

  12. sealed trait CompressionEncodingValue extends Ddl

    Permalink
  13. case class CreateSchema(schemaName: String) extends Statement with Product with Serializable

    Permalink
  14. 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

    Permalink

    Class holding all information about Redshift's table

    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

  15. sealed trait DataType extends Ddl

    Permalink

    Data types http://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html

  16. trait Ddl extends AnyRef

    Permalink

    Base class for everything that can be represented as Redshift DDL

  17. case class Default(value: String) extends ColumnAttribute with Product with Serializable

    Permalink
  18. case class DistKeyTable(columnName: String) extends TableAttribute with Product with Serializable

    Permalink
  19. case class Diststyle(diststyle: DiststyleValue) extends TableAttribute with Product with Serializable

    Permalink
  20. sealed trait DiststyleValue extends Ddl

    Permalink
  21. case class DropColumn(columnName: String, mode: Option[DropMode]) extends Ddl with Product with Serializable

    Permalink
  22. case class DropConstraint(constraintName: String, mode: Option[DropMode]) extends AlterTableStatement with Product with Serializable

    Permalink
  23. case class DropMode(value: DropModeValue) extends Ddl with Product with Serializable

    Permalink
  24. sealed trait DropModeValue extends Ddl

    Permalink
  25. case class ForeignKeyTable(columns: NonEmptyList[String], reftable: RefTable) extends TableConstraint with Product with Serializable

    Permalink
  26. case class Identity(seed: Int, step: Int) extends ColumnAttribute with Product with Serializable

    Permalink
  27. case class KeyConstaint(value: KeyConstraintValue) extends ColumnConstraint with Product with Serializable

    Permalink
  28. sealed trait KeyConstraintValue extends Ddl

    Permalink
  29. case class Nullability(value: NullabilityValue) extends ColumnConstraint with Product with Serializable

    Permalink
  30. sealed trait NullabilityValue extends Ddl

    Permalink
  31. case class OwnerTo(newOwner: String) extends AlterTableStatement with Product with Serializable

    Permalink
  32. sealed trait Permission extends Ddl

    Permalink
  33. case class PrimaryKeyTable(columns: NonEmptyList[String]) extends TableConstraint with Product with Serializable

    Permalink
  34. case class ProductType(warnings: List[String], size: Option[Int]) extends DataType with Product with Serializable

    Permalink

    These predefined data types assembles into usual Redshift data types, but can store additional information such as warnings.

    These predefined data types assembles into usual Redshift data types, but can store additional information such as warnings. Using to prevent output on DDL-generation step.

  35. case class RedshiftChar(size: Int) extends DataType with Product with Serializable

    Permalink
  36. case class RedshiftDecimal(precision: Option[Int], scale: Option[Int]) extends DataType with Product with Serializable

    Permalink
  37. case class RedshiftVarchar(size: Int) extends DataType with Product with Serializable

    Permalink
  38. case class RefTable(reftable: String, refcolumn: Option[String]) extends Ddl with Product with Serializable

    Permalink

    Reference table.

    Reference table. Used in foreign key and table constraint

    reftable

    name of table

    refcolumn

    optional column

  39. case class RenameColumn(columnName: String, newName: String) extends AlterTableStatement with Product with Serializable

    Permalink
  40. case class RenameTo(newName: String) extends AlterTableStatement with Product with Serializable

    Permalink
  41. case class SortKeyTable(sortstyle: Option[Sortstyle], columns: NonEmptyList[String]) extends TableAttribute with Product with Serializable

    Permalink
  42. sealed trait Sortstyle extends Ddl

    Permalink
  43. trait Statement extends Ddl with Product with Serializable

    Permalink

    Trait for *independent* SQL DDL statements.

    Trait for *independent* SQL DDL statements. Unlike simple Ddl objects, these can be used as stand-alone commands and be content of file. We're always using semicolon in the end of statements

  44. sealed trait TableAttribute extends Ddl

    Permalink

    table_attributes are: [ DISTSTYLE { EVEN | KEY | ALL } ] [ DISTKEY ( column_name ) ] [ [COMPOUND | INTERLEAVED ] SORTKEY ( column_name [, ...] ) ]

  45. sealed trait TableConstraint extends Ddl

    Permalink

    table_constraints are: [ UNIQUE ( column_name [, ...

    table_constraints are: [ UNIQUE ( column_name [, ... ] ) ] [ PRIMARY KEY ( column_name [, ... ] ) ] [ FOREIGN KEY (column_name [, ... ] ) REFERENCES reftable [ ( refcolumn ) ]

  46. case class UniqueKeyTable(columns: NonEmptyList[String]) extends TableConstraint with Product with Serializable

    Permalink

Value Members

  1. object All extends DiststyleValue with Product with Serializable

    Permalink
  2. object ByteDictEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  3. object CascadeDrop extends DropModeValue with Product with Serializable

    Permalink
  4. object CommentBlock extends Serializable

    Permalink
  5. object CompoundSortstyle extends Sortstyle with Product with Serializable

    Permalink
  6. object Delta32kEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  7. object DeltaEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  8. object DistKey extends ColumnAttribute with Product with Serializable

    Permalink
  9. object Empty extends Statement with Product with Serializable

    Permalink
  10. object End extends Statement with Product with Serializable

    Permalink
  11. object Even extends DiststyleValue with Product with Serializable

    Permalink
  12. object InterleavedSortstyle extends Sortstyle with Product with Serializable

    Permalink
  13. object IsolationLevel extends Ddl with Product with Serializable

    Permalink
  14. object Key extends DiststyleValue with Product with Serializable

    Permalink
  15. object LzoEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  16. object Mostly16Encoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  17. object Mostly32Encoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  18. object Mostly8Encoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  19. object NotNull extends NullabilityValue with Product with Serializable

    Permalink
  20. object Null extends NullabilityValue with Product with Serializable

    Permalink
  21. object PrimaryKey extends KeyConstraintValue with Product with Serializable

    Permalink
  22. object RawEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  23. object ReadOnly extends Permission with Product with Serializable

    Permalink
  24. object ReadWriteIsolation extends Permission with Product with Serializable

    Permalink
  25. object RedshiftBigInt extends DataType with Product with Serializable

    Permalink
  26. object RedshiftBoolean extends DataType with Product with Serializable

    Permalink
  27. object RedshiftDate extends DataType with Product with Serializable

    Permalink
  28. object RedshiftDouble extends DataType with Product with Serializable

    Permalink
  29. object RedshiftInteger extends DataType with Product with Serializable

    Permalink
  30. object RedshiftReal extends DataType with Product with Serializable

    Permalink
  31. object RedshiftSmallInt extends DataType with Product with Serializable

    Permalink
  32. object RedshiftTimestamp extends DataType with Product with Serializable

    Permalink
  33. object RestrictDrop extends DropModeValue with Product with Serializable

    Permalink
  34. object RunLengthEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  35. object SortKey extends ColumnAttribute with Product with Serializable

    Permalink
  36. object Text255Encoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  37. object Text32KEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  38. object Unique extends KeyConstraintValue with Product with Serializable

    Permalink
  39. object ZstdEncoding extends CompressionEncodingValue with Product with Serializable

    Permalink
  40. package generators

    Permalink

Ungrouped