FileCodeGenerator

slick.additions.codegen.FileCodeGenerator

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.

Attributes

See also
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def filename: String
protected def objectCodeGenerator(tableConfig: TableConfig): ObjectCodeGenerator
def packageName: String

Concrete methods

def codeString(tableConfigs: List[TableConfig], extraImports: List[String], slickProfileClass: Class[_ <: JdbcProfile]): String
def codeString(rules: GenerationRules, slickProfileClass: Class[_ <: JdbcProfile])(implicit executionContext: ExecutionContext): DBIO[String]
def codeString(rules: GenerationRules, slickProfileClassName: String)(implicit executionContext: ExecutionContext): DBIO[String]
def codeStringFormatted(rules: GenerationRules, slickProfileClassName: String, scalafmtConfig: ScalafmtConfig)(implicit executionContext: ExecutionContext): DBIO[String]
def filePath(base: Path): Path
protected def fileStatement(tableConfigs: List[TableConfig], allImports: List[Stat]): Pkg
protected def fileStatements(tableConfigs: List[TableConfig]): List[Stat]
protected def importStatements(extraImports: List[String], slickProfileClass: Class[_ <: JdbcProfile]): List[Stat]
protected def imports: List[String]
protected def objectStatements(tableConfig: TableConfig): List[Stat]
protected def packageRef: Ref
def writeToFileDBIO(baseDir: Path, slickConfig: Config, rules: GenerationRules)(implicit executionContext: ExecutionContext): DBIOAction[Path, NoStream, All]
def writeToFileSync(baseDir: Path, slickConfig: Config, rules: GenerationRules, timeout: Duration)(implicit executionContext: ExecutionContext): Path