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

set statement attributes #1315

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

iloveitaly
Copy link

You can set connection-level attributes via set_attr but not cursor-level settings. Note that I haven't had time for tests here yet, but can put them together if adding this to the project makes sense.

  • fix: set timeout before attempting connection timeout
  • feat: adding set_attr to cursor

@mkleehammer
Copy link
Owner

It does seem like a missing piece of the API - thanks. Could you add at least one test for PostgreSQL, MySQL, or SQL Server?

I'm also curious about the impetus for this. Were you looking for a statement timeout?

@mkleehammer
Copy link
Owner

I really like this idea.

I really appreciate the note in the doc string that only integers are supported right now. That will help a lot.

@eramitmittal
Copy link

This could be useful for setting SQL_ATTR_ENABLE_AUTO_IPD statement attribute as well.

Comment on lines +1115 to +1116
MAKECONST(SQL_IS_UINTEGER),
MAKECONST(SQL_IS_UINTEGER),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate lines. Should one of these be SQL_IS_INTEGER perhaps?

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

Successfully merging this pull request may close these issues.

4 participants