Renamed MySqlConnector to DbConnector.
This commit is contained in:
parent
f13a8487be
commit
5e35f07568
|
@ -22,7 +22,7 @@ namespace LogicalHacking.ExtensionDsLab.Archive
|
|||
open FSharp.Data.Sql
|
||||
open System.IO
|
||||
|
||||
module MySqlConnector =
|
||||
module DbConnector =
|
||||
[<Literal>]
|
||||
let ConnectionStringName = @"ProductionExtensionDB"
|
||||
[<Literal>]
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue