package codegen

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. codegen
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package extra

Type Members

  1. trait BaseCodeGenerator extends AnyRef

    Base trait for code generators.

    Base trait for code generators. Code generators are responsible for producing actual code, but many of the details are determined by the TableConfigs and ColumnConfigs produced by the instance of GenerationRules that is passed in.

    See also

    GenerationRules

  2. case class ColumnConfig(column: MColumn, tableFieldTerm: Name, modelFieldTerm: Name, scalaType: Type, scalaDefault: Option[Term]) extends Product with Serializable

    How a database column is to be represented in code

    How a database column is to be represented in code

    column

    the column this is for

    tableFieldTerm

    the identifier used in the Slick table definition

    modelFieldTerm

    the identifier used in the model class

    scalaType

    the type that will represent data in the column in code

    scalaDefault

    the default value to provide in the model class

  3. trait EntityGenerationRules extends GenerationRules

    Uses slick-additions-entity Lookup for foreign key fields.

    Uses slick-additions-entity Lookup for foreign key fields.

    Generated code requires slick-additions-entity.

  4. class EntityTableModulesCodeGenerator extends TablesCodeGenerator

    Uses slick-additions EntityTableModule to represent tables.

    Uses slick-additions EntityTableModule to represent tables. Generates a custom profile object that mixes in AdditionsProfile with an api member that mixes in AdditionsApi.

    Models should be generated with KeylessModelsCodeGenerator.

    Generated code requires slick-additions.

  5. trait GenerationRules extends AnyRef

    Generates TableConfigs (and their ColumnConfigs by reading database metadata.

    Generates TableConfigs (and their ColumnConfigs by reading database metadata. Extend this trait directly or indirectly, and override methods freely to customize.

    The default implementation does not generate code that requires slick-additions, uses camelCase for corresponding snake_case names in the database, and names model classes by appending Row to the camel-cased table name.

  6. class KeylessModelsCodeGenerator extends ModelsCodeGenerator

    Omits the primary key field from generated model classes, unless the primary key isn't a single column.

  7. class ModelsCodeGenerator extends BaseCodeGenerator

    Code generator that produces a case class for each table to represent a row in code

  8. case class TableConfig(tableMetadata: TableMetadata, tableClassName: String, modelClassName: String, columns: List[ColumnConfig]) extends Product with Serializable

    How a database table is to be represented in code

    How a database table is to be represented in code

    tableMetadata

    the metadata for the table this is for

    tableClassName

    the name of the Slick table definition

    modelClassName

    the name of the model class

    columns

    configurations for this table's columns

  9. case class TableMetadata(table: MTable, columns: Seq[MColumn], primaryKeys: Seq[MPrimaryKey], foreignKeys: Seq[MForeignKey]) extends Product with Serializable

    Information about a table obtained from the Slick JDBC metadata APIs

  10. class TablesCodeGenerator extends BaseCodeGenerator

    Code generator for standard Slick table definitions.

    Code generator for standard Slick table definitions. The generated code has no dependency on slick-additions.

    Tables that have more than 22 fields are mapped by simply nesting tuples so that no single tuple has more than 22 elements.

  11. class TryExtractor[A] extends AnyRef
  12. implicit final class scalametaDefnClassExtensionMethods extends AnyVal

Value Members

  1. val AsBoolean: TryExtractor[Boolean]
  2. val AsDouble: TryExtractor[Double]
  3. val AsInt: TryExtractor[Int]
  4. def snakeToCamel(s: String): String
  5. object ColType

Inherited from AnyRef

Inherited from Any

Ungrouped