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

Column selecting operations should use attnum #992

Closed
Tracked by #839
mathemancer opened this issue Jan 20, 2022 · 1 comment · Fixed by #1104
Closed
Tracked by #839

Column selecting operations should use attnum #992

mathemancer opened this issue Jan 20, 2022 · 1 comment · Fixed by #1104
Assignees
Labels
type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL

Comments

@mathemancer
Copy link
Contributor

mathemancer commented Jan 20, 2022

Problem

Currently, most column selection operations are using name or index to identify columns. This is brittle, and we've decided to change to using the attnum property of columns instead.

Proposed solution

Each function in mathesar/db/columns/operations/select.py should use attnum instead of column_index, and should properly use the table_oid, attnum pair to identify columns for its logic.

Additional context

We'll clearly need to modify any place where the functions in the above file are called as well.

@mathemancer mathemancer added ready Ready for implementation work: backend Related to Python, Django, and simple SQL work: database and removed status: triage labels Jan 20, 2022
@mathemancer mathemancer added good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this labels Jan 20, 2022
@mathemancer
Copy link
Contributor Author

mathemancer commented Jan 20, 2022

N.B. the get_column_indexes_from_table function actually gets attnums, and should be renamed accordingly. The call should also be modified, of course.

@silentninja silentninja self-assigned this Feb 17, 2022
@silentninja silentninja added status: started and removed ready Ready for implementation labels Feb 17, 2022
@kgodey kgodey removed good first issue Everything in "Help wanted", PLUS being relatively easy and straightforward to implement. help wanted Community contributors can implement this labels Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request work: backend Related to Python, Django, and simple SQL
Projects
No open projects
3 participants