davidhcoe commented on code in PR #2352:
URL: https://github.com/apache/arrow-adbc/pull/2352#discussion_r1872174780
##########
csharp/src/Client/AdbcConnection.cs:
##########
@@ -237,7 +259,25 @@ private void SetConnectionProperties(string value)
object? builderValue = builder[key];
if (builderValue != null)
{
- this.adbcConnectionParameters.Add(key,
Convert.ToString(builderValue)!);
+ string paramValue = Convert.ToString(builderValue)!;
+
+ this.adbcConnectionParameters.Add(key, paramValue);
+
+ switch (key)
+ {
+ case ConnectionStringKeywords.DecimalBehavior:
+ this.DecimalBehavior =
(DecimalBehavior)Enum.Parse(typeof(DecimalBehavior), paramValue);
+ break;
+ case ConnectionStringKeywords.StructBehavior:
+ this.StructBehavior =
(StructBehavior)Enum.Parse(typeof(StructBehavior), paramValue);
+ break;
+ case ConnectionStringKeywords.CommandTimeout:
+ CommandTimeoutValue =
ConnectionStringParser.ParseTimeoutValue(paramValue);
+ break;
+ case ConnectionStringKeywords.ConnectionTimeout:
+ this.connectionTimeoutValue =
ConnectionStringParser.ParseTimeoutValue(paramValue);
Review Comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]