Skip to content

Commit b3726df

Browse files
committed
Merge branch 'master' into feat-mssql-functions
# Conflicts: # src/SQLProvider.Runtime/Providers.MsSqlServer.Ssdt.fs # src/SQLProvider.Runtime/Ssdt.DacpacParser.fs
2 parents cb2651a + 6242820 commit b3726df

File tree

114 files changed

+9043
-7099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+9043
-7099
lines changed

.config/dotnet-tools.json

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,49 +6,64 @@
66
"version": "3.1.1",
77
"commands": [
88
"sourcelink"
9-
]
9+
],
10+
"rollForward": false
1011
},
1112
"dotnet-reportgenerator-globaltool": {
1213
"version": "4.2.15",
1314
"commands": [
1415
"reportgenerator"
15-
]
16+
],
17+
"rollForward": false
1618
},
1719
"paket": {
18-
"version": "7.2.0",
20+
"version": "8.1.0-alpha004",
1921
"commands": [
2022
"paket"
21-
]
22-
},
23-
"fake-cli": {
24-
"version": "6.0.0-alpha004",
25-
"commands": [
26-
"fake"
27-
]
23+
],
24+
"rollForward": false
2825
},
2926
"fcswatch-cli": {
3027
"version": "0.7.14",
3128
"commands": [
3229
"fcswatch"
33-
]
30+
],
31+
"rollForward": false
3432
},
3533
"fsharp-analyzers": {
3634
"version": "0.11.0",
3735
"commands": [
3836
"fsharp-analyzers"
39-
]
37+
],
38+
"rollForward": false
4039
},
4140
"dotnet-serve": {
4241
"version": "1.10.128",
4342
"commands": [
4443
"dotnet-serve"
45-
]
44+
],
45+
"rollForward": false
4646
},
4747
"fsdocs-tool": {
48-
"version": "16.1.1",
48+
"version": "20.0.0",
4949
"commands": [
5050
"fsdocs"
51-
]
51+
],
52+
"rollForward": false
53+
},
54+
"dotnet-fsharplint": {
55+
"version": "0.24.2",
56+
"commands": [
57+
"dotnet-fsharplint"
58+
],
59+
"rollForward": false
60+
},
61+
"fake-cli": {
62+
"version": "6.1.3",
63+
"commands": [
64+
"fake"
65+
],
66+
"rollForward": false
5267
}
5368
}
5469
}

.paket/Paket.Restore.targets

Lines changed: 500 additions & 497 deletions
Large diffs are not rendered by default.

.paket/paket.exe

68 KB
Binary file not shown.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ The provider currently has explicit implementations for the following database v
3131
* MySQL (& MariaDB)
3232
* MsAccess
3333
* Firebird
34+
* DuckDB
3435

3536
There is also an ODBC provider that will let you connect to any ODBC source with limited features.
3637

@@ -54,7 +55,7 @@ may cause some security problems depending on your system's configuration and
5455
which version of the .NET framework you are using. If you encounter problems
5556
loading dynamic assemblies, they can likely be resolved by applying the
5657
following element into the configuration files of fsi.exe, devenv.exe and
57-
your program or the program using your library : http://msdn.microsoft.com/en-us/library/dd409252(VS.100).aspx
58+
your program or the program using your library: http://msdn.microsoft.com/en-us/library/dd409252(VS.100).aspx
5859

5960
## Example
6061

SQLProvider.Tests.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{DB81
3737
tests\SqlProvider.Tests\scripts\MySqlTests.fsx = tests\SqlProvider.Tests\scripts\MySqlTests.fsx
3838
tests\SqlProvider.Tests\scripts\OdbcTests.fsx = tests\SqlProvider.Tests\scripts\OdbcTests.fsx
3939
tests\SqlProvider.Tests\scripts\OracleTests.fsx = tests\SqlProvider.Tests\scripts\OracleTests.fsx
40+
tests\SqlProvider.Tests\scripts\PostgreSQLTests.fsx = tests\SqlProvider.Tests\scripts\PostgreSQLTests.fsx
4041
tests\SqlProvider.Tests\scripts\SQLLiteTests.fsx = tests\SqlProvider.Tests\scripts\SQLLiteTests.fsx
4142
tests\SqlProvider.Tests\scripts\SqlServerTests.fsx = tests\SqlProvider.Tests\scripts\SqlServerTests.fsx
4243
EndProjectSection

build.cmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ rem build -t PackNuget
44
cls
55
dotnet tool restore
66
dotnet paket restore
7+
rem set FAKE_SDK_RESOLVER_CUSTOM_DOTNET_VERSION=8.0
8+
rem Build with Fake or FSI:
79
dotnet fake run build.fsx %*
10+
rem dotnet fsi build.fsx %*

build.fsx

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,52 @@
1-
#r "paket: groupref build //"
1+
printfn "Building..."
22
//#load "docs/CLI.fs"
33

4+
#if FAKE
5+
#r "paket: groupref build //"
46
#r "./packages/build/System.Data.SqlClient/lib/netstandard2.0/System.Data.SqlClient.dll"
7+
open System.Data.SqlClient
8+
#endif
9+
510

611
#if !FAKE
7-
#load "./.fake/build.fsx/intellisense.fsx"
8-
#r "netstandard" // Temp fix for https://github.com/fsharp/FAKE/issues/1985
12+
//#load "./.fake/build.fsx/intellisense.fsx"
13+
//Versions should be compatible with paket.lock Build group:
14+
#r "nuget: Microsoft.SourceLink.GitHub, 8.0"
15+
//#r "./paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
16+
#r "nuget: FSharp.Formatting, 21.0.0-beta-003"
17+
#r "nuget: Nuget.CommandLine"
18+
#r "nuget: RazorEngine"
19+
#r "nuget: Fake.IO.FileSystem"
20+
#r "nuget: Fake.Core.Target"
21+
#r "nuget: Fake.Core.ReleaseNotes"
22+
#r "nuget: FAKE.Core.Environment"
23+
#r "nuget: Fake.DotNet.Cli"
24+
#r "nuget: Fake.Core.Process"
25+
#r "nuget: Fake.DotNet.AssemblyInfoFile"
26+
#r "nuget: Fake.Tools.Git"
27+
#r "nuget: Fake.DotNet.Paket"
28+
#r "nuget: Fake.Api.GitHub"
29+
#r "nuget: Fake.BuildServer.AppVeyor"
30+
#r "nuget: Fake.BuildServer.Travis"
31+
#r "nuget: Fake.DotNet.MSBuild"
32+
#r "nuget: Fake.DotNet.FSFormatting"
33+
#r "nuget: Fake.DotNet.Testing.NUnit"
34+
#r "nuget: FSharp.Compiler.Service"
35+
#r "nuget: Microsoft.Data.SqlClient"
36+
#r "nuget: MSBuild.StructuredLogger, 2.2.337"
37+
// Boilerplate
38+
System.Environment.GetCommandLineArgs()
39+
|> Array.skip 2 // skip fsi.exe; build.fsx
40+
|> Array.toList
41+
|> Fake.Core.Context.FakeExecutionContext.Create false __SOURCE_FILE__
42+
|> Fake.Core.Context.RuntimeContext.Fake
43+
|> Fake.Core.Context.setExecutionContext
44+
45+
open Microsoft.Data.SqlClient
946
#endif
1047

48+
49+
1150
open Fake
1251
open Fake.SystemHelper
1352
open Fake.Core.TargetOperators
@@ -108,11 +147,15 @@ Target.create "AssemblyInfo" (fun _ ->
108147
// Clean build results
109148

110149
Target.create "Clean" (fun _ ->
150+
!! "bin/" |> Shell.cleanDirs
111151
!! "**/**/bin/" |> Shell.cleanDirs
112152
!! "**/**/temp/" |> Shell.cleanDirs
113153
!! "**/**/obj/" |> Shell.cleanDirs
114154
!! "**/**/test*/**/obj/" |> Shell.cleanDirs
115-
155+
!! "**/**/test*/SqlProvider.Core.Tests/MsSqlSsdt/MsSqlSsdt.Tests/AdventureWorks_SSDT/obj/" |> Shell.cleanDirs
156+
!! "**/**/test*/SqlProvider.Core.Tests/MsSqlSsdt/MsSqlSsdt.Tests/obj/" |> Shell.cleanDirs
157+
"tests/SqlProvider.Core.Tests/MsSqlSsdt/MsSqlSsdt.Tests/AdventureWorks_SSDT/AdventureWorks_SSDT.dacpac" |> Shell.rm
158+
116159
Shell.cleanDirs ["bin"; "temp"]
117160
)
118161

@@ -124,7 +167,13 @@ Target.create "CleanDocs" (fun _ ->
124167
// Build library & test project
125168

126169
Target.create "Build" (fun _ ->
127-
Fake.DotNet.DotNet.build (fun p -> {p with Configuration = DotNet.BuildConfiguration.Release}) "SQLProvider.sln"
170+
Fake.DotNet.DotNet.build (fun p ->
171+
{
172+
p with
173+
Configuration = DotNet.BuildConfiguration.Release
174+
MSBuildParams = { MSBuild.CliArguments.Create() with DisableInternalBinLog = true }
175+
176+
}) "SQLProvider.sln"
128177
)
129178

130179
Target.create "BuildTests" (fun _ ->
@@ -187,7 +236,7 @@ Target.create "SetupPostgreSQL" (fun _ ->
187236

188237
let setupMssql url saPassword =
189238

190-
let connBuilder = System.Data.SqlClient.SqlConnectionStringBuilder()
239+
let connBuilder = SqlConnectionStringBuilder()
191240
connBuilder.InitialCatalog <- "master"
192241
connBuilder.UserID <- "sa"
193242
connBuilder.DataSource <- url
@@ -197,9 +246,9 @@ let setupMssql url saPassword =
197246
// We wait up to 30 seconds for MSSQL to be initialized
198247
let rec runCmd' attempt =
199248
try
200-
use conn = new Data.SqlClient.SqlConnection(connBuilder.ConnectionString)
249+
use conn = new SqlConnection(connBuilder.ConnectionString)
201250
conn.Open()
202-
use cmd = new Data.SqlClient.SqlCommand(query, conn)
251+
use cmd = new SqlCommand(query, conn)
203252
cmd.ExecuteNonQuery() |> ignore
204253
with e ->
205254
printfn "Connection attempt %i: %A" attempt e
@@ -258,6 +307,7 @@ Target.create "RunTests" (fun _ ->
258307
Common =
259308
p.Common
260309
|> Fake.DotNet.DotNet.Options.withAdditionalArgs [||]
310+
MSBuildParams = { MSBuild.CliArguments.Create() with DisableInternalBinLog = true }
261311
}) "SQLProvider.Tests.sln"
262312

263313
(*
@@ -412,7 +462,7 @@ Target.create "BuildDocs" ignore
412462
#else
413463
//=?> ("SourceLink", Pdbstr.tryFind().IsSome )
414464
#endif
415-
=?> ("NuGet", not(Fake.Core.Environment.hasBuildParam "onlydocs"))
465+
=?> ("NuGet", not(Fake.Core.Environment.hasEnvironVar "onlydocs"))
416466
==> "ReleaseDocs"
417467
==> "Release"
418468

0 commit comments

Comments
 (0)