-
Notifications
You must be signed in to change notification settings - Fork 144
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
Sproc support for Oracle and SQL Server #83
Conversation
should really do this for all of the DB's 👍
Should now be able to Quote Unions and Records
Note: Postgresql is the only one not working for the minute because of the manual type mapping that is required. Seems to be a problem with how the actual driver is implemented.
…rameters when calling some sprocs
This might seem a wierd thing to to in a type provider but since there is no way to reason about the type set returned from a sproc when it is a ref cursor or a MARS set, this seemed like the most natural thing to do.
This enables various scenarios like mapping Json or Xml into a type richer than a string.
Are named parameters on DU's not supported on travis?
Might want to leave this open until PostgreSQL and MySql support is sorted.. |
…ocs without executing.
Quick update, MYSQL support is nearly done, but has been way more of a PITA than the other providers, Postgre is next but I have spiked this and looks straight forward. |
Great work Colin, I am looking forward to seeing the results of all this effort. I'd hoped you would be around at the F# meetup last week so we could discuss, but alas ! |
Yeah, it is kinda hard for me to get down there these days as I'm contracting 9-5 in Coventry. Hoping to make the next one though whenever that is. |
Support for MARS still evades me..
Mars sprocs working but not as clean as some of the other providers because I can't seem to be able to figure out how to get the number of result sets returned.
To summarize all of these commits add sproc support, for MySQL, MS SqlServer, Oracle and PostgreSQL. There isn't quiet feature parity across all of these providers, mainly because some drivers / databases just do not yield this information. However Oracle and SQL Server are the most complete. |
Is this ready to be merged now then in your opinion Colin ? |
Yep, it all hangs together. The best way to get the final bugs out will be to test on real world databases. |
So whats the plan for this, with regards to @simonhdickson splitting apart of stuff? |
I think if your stuff is ready to merge then I'll merge it into my split branch too, that branch isn't ready to merge into master yet. |
I'll merge this to master a bit later hopefully when I have got some time to test it all post-merge |
Groovy, there are a set of DB scripts that I have been using for the test DB's here if that is any help, I also have a set of VM's with the databases installed but thats about 40GB, which is a little large to commit. |
Sproc support for Oracle and SQL Server
Lots of changes here... but to summarize this PR provides the following,
SqlEntity.MapTo<'a>()
function. This is pretty niave at the minute but works for Records and class types. Additionally, has some mapping conventions, underscores are removed and are matched on lower case strings.MapTo<'a>
has an overload so you have tighter control over how individual properties are mapped. See theSqlServerTests.fsx
orOracle.fsx
for an example.Support for other providers should be along the lines of a copy of one oracle or SqlServer I should imagine but I focused on these two first, MySql will be next.
Cheers
Colin