-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Refactor cursor retrieval in PostgresHook. #35498
Refactor cursor retrieval in PostgresHook. #35498
Conversation
… for efficient cursor type resolution and clearer error messaging.
NIT: (changed the name) It's refactotr, not optimisatio. It's llikely (not sure) lest optimized than previous code but indeed nicer. |
NIT: (changed the name) It's refactor, not optimisation :). It's llikely (not sure) lest optimized than previous code but indeed nicer. |
I've just, hopefully, fixed the failing tests from the last time you approved by running the pre-commit (my bad for not running it earlier), @potiuk thanks for reviewing! :) |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
* Improve cursor lookup in PostgresHook, Refactored to use a dictionary for efficient cursor type resolution and clearer error messaging. * Ran pre-commit that removed redundant spaces that doesn't match the format of code
Refactored the
_get_cursor
method for improved efficiency and error handling.The method now uses a dictionary for cursor type lookup, streamlining the addition of future cursor types and providing clearer error messages for invalid cursors.