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

attribute sets #7

Open
ostap opened this issue Aug 28, 2012 · 0 comments
Open

attribute sets #7

ostap opened this issue Aug 28, 2012 · 0 comments
Assignees

Comments

@ostap
Copy link
Member

ostap commented Aug 28, 2012

"attribute sets" is an extension to the bandicoot language with the following goals:

  1. make the type composition easier
  2. improve the readability and safety of certain relational operators

when working with the relational types the same attributes appear in multiple relations, e.g.:

type Queue {position int, taskId long}
type Task {taskId long, command string}

with the help of attribute sets the attribute taskId could be moved out into a separate type and then reused by both types:

type TaskId {taskId long}
type Queue {position int, TaskId}
type Task {TaskId, command string}

this way users can evolve the binding types independently from the main types. in other words if a user needs to change the TaskId he needs to perform the change in only one place.

another aspect of this enhancement is the extension of the following relational operators:

  • join: join TaskId queue tasks
  • minus: minus TaskId queue tasks
  • project: project TaskId queue

this way it becomes clear which attributes are involved in the join operation. the safety aspect comes from the fact that if the Queue and Task types get extended it does not impact the result of the corresponding join operation.

@ghost ghost assigned ostap Aug 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant