Incorporate doc lib v4 ordering

This commit is contained in:
2024-08-22 23:00:25 -04:00
parent d4c0e4e26c
commit cc3e41ddc5
15 changed files with 184 additions and 181 deletions
@@ -17,11 +17,11 @@ type PostgresThemeData(log: ILogger) =
/// Retrieve all themes (except 'admin'; excludes template text)
let all () =
log.LogTrace "Theme.all"
let fields = [ Field.NE (nameof Theme.Empty.Id) "admin" ]
Custom.list
$"{Query.find Table.Theme}
WHERE data->>'{nameof Theme.Empty.Id}' <> 'admin'
ORDER BY data->>'{nameof Theme.Empty.Id}'"
[]
(Query.byFields (Query.find Table.Theme) Any fields
+ Query.orderBy [ Field.Named (nameof Theme.Empty.Id) ] PostgreSQL)
(addFieldParams fields [])
withoutTemplateText
/// Does a given theme exist?