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

feat(csharp/src/Client): parse custom properties from connection string #2352

Merged
merged 6 commits into from
Dec 6, 2024

Conversation

davidhcoe
Copy link
Contributor

Follow up to #2312 to add parsing of the timeout values and other custom properties like StructBehavior and DecimalBehavior from the connection string.

Copy link
Contributor

@birschick-bq birschick-bq left a comment

Choose a reason for hiding this comment

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

Looks good to me.

I had a question about the use of ConnectionTimeout in this scenario and a suggestion on maybe a different choice for the parsing exception.

CommandTimeoutValue = ConnectionStringParser.ParseTimeoutValue(paramValue);
break;
case ConnectionStringKeywords.ConnectionTimeout:
this.connectionTimeoutValue = ConnectionStringParser.ParseTimeoutValue(paramValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this has no effect on the underlying ADBC driver, is this to help synchronize the value with the driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right in that it doesn't do much. The initial driver value would get set when the properties are passed in for the driver. However, ConnectionTimeout is only a get call, and it would differ from the actual value that was passed in. That said, maybe this could be better if you have an idea.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a slight tweak to it so that it will set the property on the driver if it is passed in and it will also have a matching get value in that case.

csharp/src/Client/ConnectionStringParser.cs Outdated Show resolved Hide resolved
@birschick-bq
Copy link
Contributor

@davidhcoe - Everything else looks good to me.

@davidhcoe davidhcoe marked this pull request as draft December 5, 2024 23:35
@davidhcoe davidhcoe marked this pull request as ready for review December 6, 2024 01:53
Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

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

Thanks!

@CurtHagenlocher CurtHagenlocher merged commit 927922f into apache:main Dec 6, 2024
6 checks passed
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.

3 participants