Integrate v4 document library for SQLite

- Eliminate warnings for PostgreSQL
This commit is contained in:
2024-08-19 22:23:22 -04:00
parent cd450a05e5
commit fbc4e891bd
9 changed files with 102 additions and 127 deletions

View File

@@ -2,7 +2,6 @@
open BitBadger.Documents
open BitBadger.Documents.Postgres
open BitBadger.Documents.Postgres.Compat
open Microsoft.Extensions.Logging
open MyWebLog
open MyWebLog.Data
@@ -21,7 +20,7 @@ type PostgresCategoryData(log: ILogger) =
log.LogTrace "Category.countTopLevel"
Custom.scalar
$"""{Query.byContains (Query.count Table.Category)}
AND {Query.whereByField (Field.NEX (nameof Category.Empty.ParentId)) ""}"""
AND {Query.whereByFields Any [ Field.NEX (nameof Category.Empty.ParentId) ]}"""
[ webLogContains webLogId ]
toCount
@@ -95,7 +94,7 @@ type PostgresCategoryData(log: ILogger) =
Query.byId (Query.removeFields Table.Category) "",
children
|> List.map (fun child ->
[ idParam child.Id; fieldNameParam [ nameof Category.Empty.ParentId ] ])
[ idParam child.Id; fieldNameParams [ nameof Category.Empty.ParentId ] ])
let! _ =
Configuration.dataSource ()
|> Sql.fromDataSource