Skip to content

postgres_connector Refactoring#287

Open
hollowtree11 wants to merge 3 commits intomainfrom
jmuller_working
Open

postgres_connector Refactoring#287
hollowtree11 wants to merge 3 commits intomainfrom
jmuller_working

Conversation

@hollowtree11
Copy link
Copy Markdown
Collaborator

Issue #283

Refactored build_where_text to use the psycopg2.sql module, refactored the rest of the functions to use the new logic, deleted build_family_where_text, created apply_filter_logic function to format filters correctly and create SQL statement for the filter. This function allows us to build queries using SQL, Identifier, and Placeholder objects, ensuring that table names, column names, and values are handled safely by the driver.

Issue #286

Rebuilt a custom version of the DictCursor code in postgres_connector, using only Python primitives (no additional libraries). Created a new function rows_to_dicts which takes the results from a database search and turns them into a list of labeled dictionaries so the data is easier to read and use. Refactored try_query to use this new function instead of DictCursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant