Renamed MySqlConnector to DbConnector.

This commit is contained in:
Achim D. Brucker 2018-07-23 06:10:27 +01:00
parent f13a8487be
commit 5e35f07568
6 changed files with 10 additions and 10 deletions

View File

@ -22,7 +22,7 @@ namespace LogicalHacking.ExtensionDsLab.Archive
open FSharp.Data.Sql
open System.IO
module MySqlConnector =
module DbConnector =
[<Literal>]
let ConnectionStringName = @"ProductionExtensionDB"
[<Literal>]

View File

@ -20,7 +20,9 @@
namespace LogicalHacking.ExtensionDsLab.Archive
module ExtensionCore =
let getDownloads (ctx:MySqlConnector.ExtensionDbType) extid =
open DbConnector
let getDownloads (ctx:ExtensionDbType) extid =
query {
for order in ctx.Extensions.Extension do
where (order.Extid = extid)
@ -28,12 +30,10 @@ module ExtensionCore =
} |> Seq.filter (fun (_, download) -> download.IsSome)
|> Seq.map (fun (date, download) -> (date,
download.Value))
|> Seq.toArray
let getAllExtIds (ctx:MySqlConnector.ExtensionDbType) =
let getAllExtIds (ctx:ExtensionDbType) =
query {
for ext in ctx.Extensions.Extension do
select ext.Extid
distinct
} |> Seq.toList
}

View File

@ -38,7 +38,7 @@ open System.Configuration
[<AutoOpen>]
module ScriptConfig=
open LogicalHacking.ExtensionDsLab.Archive.MySqlConnector
open LogicalHacking.ExtensionDsLab.Archive.DbConnector
let connectionStringOrDefault ctx =
let map = new ExeConfigurationFileMap(ExeConfigFilename = __SOURCE_DIRECTORY__ + "/app.config")

View File

@ -16,7 +16,7 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<ItemGroup>
<Compile Include="MySqlConnector.fs" />
<Compile Include="DbConnector.fs" />
<Compile Include="ExtensionCore.fs" />
<None Include="Script.fsx" />
<None Include="ExtensionsDsLab.fsx" />

View File

@ -21,7 +21,7 @@
#load "ExtensionDsLab.fsx"
open LogicalHacking.ExtensionDsLab
open LogicalHacking.ExtensionDsLab.Archive.MySqlConnector
open LogicalHacking.ExtensionDsLab.Archive.DbConnector
open LogicalHacking.ExtensionDsLab.Archive.ExtensionCore
open Deedle

View File

@ -8,7 +8,7 @@ open System
open System.Configuration
open LogicalHacking.ExtensionDsLab
open LogicalHacking.ExtensionDsLab.Archive.MySqlConnector
open LogicalHacking.ExtensionDsLab.Archive.DbConnector
open LogicalHacking.ExtensionDsLab.Archive.ExtensionCore