-
Notifications
You must be signed in to change notification settings - Fork 481
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
add tupleCursor and type dictCursor #2086
base: main
Are you sure you want to change the base?
add tupleCursor and type dictCursor #2086
Conversation
All contributors have signed the CLA ✍️ ✅ |
71c57e4
to
7f9d76b
Compare
recheck |
I have read the CLA Document and I hereby sign the CLA |
def fetchall(self) -> list[dict]: | ||
return super().fetchall() | ||
|
||
class TupleCursor(SnowflakeCursor): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need TupleCursor
? this is effectively the default SnowflakeCursor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SnowflakeCursor
has to return Union[None|dict|tuple]
because could be instanciated as
SnowflakeCursor(use_dict_result=True)
.
TupleCursor
is just a SnowflakeCursor
that return Union[None|tuple]
on fetch
On DictCursor
the better types will not require nothing for the user, on TupleCursor
it will require that they start to instanciate as TupleDict
, so maybe its not useful. I let you to decide, let me know if you want and i delete the TupleCursor
from PR and issue.
Add tupleCursor like dictCursor but always return Tuple. Modify types of dictCursor to always return dict
related to: #2085