Update for doc lib v4-rc4

This commit is contained in:
2024-09-17 08:05:30 -04:00
parent 95be82cc84
commit 0032d15c0a
16 changed files with 119 additions and 188 deletions
@@ -55,11 +55,11 @@ type PostgresWebLogUserData(log: ILogger) =
/// Find the names of users by their IDs for the given web log
let findNames webLogId (userIds: WebLogUserId list) = backgroundTask {
log.LogTrace "WebLogUser.findNames"
let idSql, idParams = inClause $"AND data->>'{nameof WebLogUser.Empty.Id}'" "id" userIds
let idField = Field.In (nameof WebLogUser.Empty.Id) (List.map (string >> box) userIds)
let! users =
Custom.list
$"{selectWithCriteria Table.WebLogUser} {idSql}"
(webLogContains webLogId :: idParams)
$"{selectWithCriteria Table.WebLogUser} AND {Query.whereByFields All [ idField ]}"
(addFieldParams [ idField ] [ webLogContains webLogId ])
fromData<WebLogUser>
return users |> List.map (fun u -> { Name = string u.Id; Value = u.DisplayName })
}