-
Notifications
You must be signed in to change notification settings - Fork 140
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
#83 Add DbProviderFactory with inflicted changes #84
Conversation
I added implementation of SnowflakeDbCommandBuilder, although it seems not to be important for FluentMigrator. We urgently need these changes for this PR in FluentMigrator project. |
I will try to merge it today. Thanks for your contribution! |
@@ -25,6 +25,14 @@ public class SnowflakeDbCommand : DbCommand | |||
|
|||
private SFLogger logger = SFLoggerFactory.GetLogger<SnowflakeDbCommand>(); | |||
|
|||
public SnowflakeDbCommand() |
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.
So the reason why you add parameterless constructor is because .net driver allows application to set Connection object after DbCommand is created, right?
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.
Yes, that's right.
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.
Specially in the added Factory class this is needed. It's late already here, I won't probably answer further questions today.
@ikudjoi Thanks. I am doing some testing right now. It seems to me that I have to add this line to SnowflakeDbFactory.cs to make it work.
Otherwise, it will complain
So I have to merge it tomorrow. Sorry for that. |
Hi, sorry, I didn't write that test you are referring to but that change sounds cool to me. This is how I use the factory in FluentMigrator project So only full assembly name of the factory is given. The factory specifies the different classes of the Snowflake connector. Btw, is there a reason that the command connection is immutable? I just tried to change as little as possible and made it throw an exception if the connection is changed. |
I guess command's connection can be changed. However, I am from JDBC. So in JDBC there is no way to change |
Also, a quick note. Our current SnowflakeDbAdaptor did not support delete or update or insert. Only select statement is supported. Not sure if this will influence your project. |
Merged in #89 |
Thanks for accepting the PR! You are going to release new NuGet package version sometime soon, right? |
@ikudjoi I will release it today. |
FYI, 1.0.5 is out. https://www.nuget.org/packages/Snowflake.Data/ |
Cool, thanks! |
Add DbProviderFactory implementation SnowflakeDbFactory.
Had to add parameterless constructors to existing classes.