Skip to content

Conversation

@eywalker
Copy link
Contributor

@eywalker eywalker commented Jun 4, 2015

I have made a few changes on how Relation object instantiation is handled. Following is a summary:

  • There now exists Relation and its subclass ClassRelation
  • Relation can be instantiated directly, taking in name of table, name of schema, connection object, table definition, and context dictionary. This allows for one to manipulate tables quickly without having to write a dedicated class
  • Each direct instance of Relation may (and will likely) point to different tables on potentially different schema or even different database servers - there is no class level binding
  • ClassRelation is a subclass of Relation that is designed from ground up to be bound to a specific schema & database at the class level - this way every instance of ClassRelation derivative is already bound to a specific schema, and any change in relevant information (e.g. heading) is shared among all instances
  • ManualRelation, ComputedRelation, etc are derived from ClassRelation, and the end users are expected to derive their classes from one of these classes, rather than directly inheriting from the ClassRelation

dimitri-yatsenko added a commit that referenced this pull request Jun 4, 2015
@dimitri-yatsenko dimitri-yatsenko merged commit 34caae3 into datajoint:decorator Jun 4, 2015
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

Successfully merging this pull request may close these issues.

2 participants