-
Notifications
You must be signed in to change notification settings - Fork 6
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
Mssql multi driver support #10
Conversation
…due to inheritance shenanigans
…s as expected dbi.t Sybase still fail w/ attributes from ODBC land. Additionally 2 more failure happpen where the port is missing from resulting URI
This does way more than I had expected. I've revised it and committed the changes in 05061bf..2a09bcc. I have it all in the ado branch because, frankly, I find ADO pretty impenetrable. From some Googling, it looks like the parameters change based on the |
yeah it does more than single change to mssql’s dbi_dsn because if you don't rebless the internal object you get, say ODBC’s attributes, instead of Sybase’s attributes when when you:
You can see that in action if you change the With the rebless you must have the special The other advantage of reblessing is you change it once and it sticks. Otherwise in any code base that calls dbi_dsn w/ an alternate driver they have to include the driver argument in every call to dbi_dsn() Instead of, say, an initialization step that calls All of that is why I included so many tests proving the behavior (dbi.t) and permutations (mssql.t) of changing one sticking. HTH |
You don't want to rebless the object, because that changes out from under who is using it. I have the code instead bless a copy. That avoids the need to have the argument-handling |
ok, but its not just about it sticking, since its essentially just calling another class’s dbi_dsn it will be wrong sometime because it will be using the original class for other things, e.g. attributes. e.g. if you that is why the entire underlying object had to change. HTH! |
Well, the URIs are for a database engine, not for the DBI. This way, I could see an argument for casting a URI from one class to another. You can do that by changing the engine:
But I don't think it makes sense to do in |
ok, let me know if I can be of any assistance, thanks :) |
@theory If ADO is weird, what do you think about calling ADO support experimental w/ a pointer to a github issue asking for some assistance w/ it? That way we can do mssql support and not worry too much about ADO being a problem. Just a thought :) |
Good idea. Added #11. I'll push out a release pointing to it today. |
Okay, v0.17 is on its way to CPAN. |
you are über fast ;) |
Review
Changes:
Testing:
prove -lw t
== All tests successful.