Turned getDownloads into a proper query.
This commit is contained in:
parent
f0b2b92c43
commit
d1b0a7d402
|
@ -25,12 +25,10 @@ module ExtensionQueries =
|
|||
let getDownloads (ctx:ExtensionDbType) extid =
|
||||
query {
|
||||
for order in ctx.Extensions.Extension do
|
||||
where (order.Extid = extid)
|
||||
select (order.Date, order.Downloads)
|
||||
} |> Seq.filter (fun (_, download) -> download.IsSome)
|
||||
|> Seq.map (fun (date, download) -> (date,
|
||||
download.Value))
|
||||
|
||||
where (order.Extid = extid && order.Downloads.IsSome)
|
||||
select (order.Date, order.Downloads.Value)
|
||||
}
|
||||
|
||||
let getAllExtIds (ctx:ExtensionDbType) =
|
||||
query {
|
||||
for ext in ctx.Extensions.Extension do
|
||||
|
|
Loading…
Reference in New Issue