Make RelationDef abstract and use subtypes to define specific Relation implementations
Problem Description
Currently a RelationDef can be used to define an arbitrary Relation implementation (SingleRowRelation, RowRelation, ColumnRelation, etc.)
The semantic of a RelationDef therefore is merely a schema definition
This leads to a mix of concerns when defining Dactors because only there it is defined what kind of Relation is actually instantiated from the RelationDef
Proposed interface allows for clear definition syntax even when using various Relation types in a Dactor:
Issue
RelationDef
abstract and use subtypes to define specificRelation
implementationsProblem Description
RelationDef
can be used to define an arbitraryRelation
implementation (SingleRowRelation
,RowRelation
,ColumnRelation
, etc.)RelationDef
therefore is merely a schema definitionDactor
s because only there it is defined what kind ofRelation
is actually instantiated from theRelationDef
Relation
types in aDactor
:// 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 }