Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Relation-Name as Constructor parameter to RelationDef #117

Open
srfc opened this issue Sep 13, 2018 · 0 comments
Open

Pass Relation-Name as Constructor parameter to RelationDef #117

srfc opened this issue Sep 13, 2018 · 0 comments

Comments

@srfc
Copy link
Collaborator

srfc commented Sep 13, 2018

Issue

  • pass relation name as constructor parameter to RelationDef

  • Current relation definition example:

object Cast extends RelationDef {
    val starId: ColumnDef[Int] = ColumnDef("star_id")
    val name: ColumnDef[String] = ColumnDef("name")
    val role: ColumnDef[String] = ColumnDef("role")

    override val name: String = "cast"
    override val columns: Set[UntypedColumnDef] = Set(starId, name, role)
}
  • Change to:
object Cast extends RelationDef("cast") {
    val starId: ColumnDef[Int] = ColumnDef("star_id")
    val name: ColumnDef[String] = ColumnDef("name")
    val role: ColumnDef[String] = ColumnDef("role")

    override val columns: Set[UntypedColumnDef] = Set(starId, name, role)
}

Problem Description

  • current definition style:

Supporting Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant