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

Simple model of itsdb tables and rows #89

Closed
goodmami opened this issue Nov 22, 2016 · 1 comment
Closed

Simple model of itsdb tables and rows #89

goodmami opened this issue Nov 22, 2016 · 1 comment
Milestone

Comments

@goodmami
Copy link
Member

ItsdbProfile.read_table() should perhaps return a basic ItsdbTable instance, which might just be a wrapper around a list. Similarly, it could be a list of ItsdbRows, which wraps another list (not a dict). Then functions like select() could be on these classes.

One benefit, besides a more friendly API, is that joined tables can be more manageable, with names, easier column selection, etc.

@goodmami goodmami modified the milestone: v0.7.0 Jan 20, 2017
@goodmami
Copy link
Member Author

goodmami commented Oct 2, 2017

I think there was a reason I wanted to have named joins, but I don't remember it.

I think one reason for a table object was so this:

itsdb.select_rows(('parse:i-id', 'result:mrs'), profile.join('parse', 'result'))

could be this:

profile.join('parse', 'result').select(('parse:i-id', 'result:mrs'))

But also maybe so I could join more than two tables:

table = profile['item'].join('parse').join('result')
table.select(('item:i-input', 'result:mrs'))

While the proposed behavior above seems useful, I will in any case not prioritize this at the moment.

goodmami added a commit that referenced this issue Apr 19, 2018
Update Relations class so table relations are encapuslated with a
TableRelations class.

New elements still need docstrings and unit tests.

Addresses #89
Addresses #99
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