fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
564 stars 144 forks source link

Ssdt dacpac #704

Closed JordanMarr closed 3 years ago

JordanMarr commented 3 years ago

Proposed Changes

This PR completely overhauls the SSDT provider to work with .dacpac files. This is way better that the previous release which was actually parsing the .sql files. Advantages:

Types of changes

What types of changes does your code introduce to SQLProvider? Put an x in the boxes that apply

This is a breaking change because the previous release expected the SsdtPath to be set to a .sqlproj file, whereas this release expects a .dacpac.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Thorium commented 3 years ago

Would it be worth of having both SSDT and Dacpac, or not?

(i.e. can you easily create dacpac from your ssdt, so that it wouldn't be needed?)

JordanMarr commented 3 years ago

Would it be worth of having both SSDT and Dacpac, or not?

(i.e. can you easily create dacpac from your ssdt, so that it wouldn't be needed?)

Benefits of the .dacpac:

Given that .dacpac does a much better job of providing types for views, and the fact that it is automatically generated on each build, I don't see any reason to support direct parsing of SQL.

In fact, I think there is reason to not support it:

With all that said, it would certainly be possible to have both, but probably not worth it.

Thorium commented 3 years ago

Thanks! Released in 1.1.98.

JordanMarr commented 3 years ago

Thanks! Released in 1.1.98.

Just tested it and everything works great! Very exciting!