-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add driver logic to MSSQL engine. #6
Add driver logic to MSSQL engine. #6
Conversation
Conflicts: lib/App/Sqitch/Role/DBIEngine.pm We'd made an almost identical change and they conflicted. To resolve the conflict I kept my local version since the indentation was constent and it had an explicit return for clarity.
I believe so yes, that is partly what the |
|
I'll see what I can do, @brianmckeen do you want the DSN part as part if this pull request or are you OK with it being separate? |
@theory if I am looking at it correctly, either a. the mssql engine can't use the URI object at all (and will need to manually build the DSN) or b. we'll need to create a new module, URI::ado, and set the object's uri() to the appropriaely (but its a ro attribute so that not really possible ATM) or c. have URI::mssql do the same discovery and use the right one or d. ??? @brianmckeen I am thinking that with my lack of familiarity with this part of sqitch and MSSQL it may behoove us to move the DSN part of this change to its own issue after this one, #6, is merged :) |
@brianmckeen I created a wiki page of TODOs that includes the DSN stuff, so I'd say go ahead and process this PR as-is and the DSN voodoo can happen as either of us can get to it. https://github.com/brianmckeen/sqitch/wiki/MSSQL-TODO HTH! |
Add driver logic to MSSQL engine.
@drmuey: You'll need to construct the DSN from the URI::mssql object based on the driver you load. I think, though, it might be useful to add an interface to URI::mssql to which you can pass a driver name and it will return the DSN. Something like:
This design requires adding URI::_ado. I'm not sure how ADO DSNs are constructed, but a quick search seems to indicate it's similar to ODBC, in which case the implementation might be most easily done by subclassing URI::_odbc:
Such a patch should go to the URI::db project. |
@theory excellent thanks, I'll start in via that route ;) |
@brianmckeen Hey Brian, I am working on another pull request and part of it is the AUTHOR section. Would you like me to use the email address you used in the original thread, your git hub URL, or something else? |
@drmuey Please use [email protected] |
@brianmckeen awesome thanks! its done ;) |
Changes:
Note sure why it is including the first 3 SHAs (2 from PR #4 and my fork update), these are the ones that it actually includes:
Testing:
FWiW:
We still need (probably issues for)Update: created https://github.com/brianmckeen/sqitch/wiki/MSSQL-TODO
Typical engine tests for mssql.pm (which will be difficult for me to do ATM)POD for new()’s _driver attr (or do we?)Determine if the?how does $uri->dbi_dsn know what $self->driver to use?
comment is a thing or not.Determine if thethis being necessary seems like a bug, no?
comment is a thing or not.