-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Issue
- Make
RelationDefabstract and use subtypes to define specificRelationimplementations
Problem Description
- Currently a
RelationDefcan be used to define an arbitraryRelationimplementation (SingleRowRelation,RowRelation,ColumnRelation, etc.) - The semantic of a
RelationDeftherefore is merely a schema definition - This leads to a mix of concerns when defining
Dactors because only there it is defined what kind ofRelationis actually instantiated from theRelationDef - Proposed interface allows for clear definition syntax even when using various
Relationtypes in aDactor:
// Companion object
object Info extends SingleRowRelationDef("info") {
// [...]
}
object Cast extends RowRelationDef("cast") {
// [...]
}
// Dactor
class Film(id: Int) extends Dactor(id) {
override protected val relations: Map[RelationDef, MutableRelation] =
createRelations(Set(Film.Info, Film.Cast)) // a single relation instantiation function!
override def receive: Receive = Actor.emptyBehavior
}- This will also make it easier to develop a DSL for data modelling
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels