Update to new doc library
Still need to remove deprecated calls
This commit is contained in:
@@ -25,10 +25,7 @@ type SQLiteThemeData(conn : SqliteConnection, log: ILogger) =
|
||||
/// Retrieve all themes (except 'admin'; excludes template text)
|
||||
let all () =
|
||||
log.LogTrace "Theme.all"
|
||||
conn.customList
|
||||
$"{Query.selectFromTable Table.Theme} WHERE {idField} <> 'admin' ORDER BY {idField}"
|
||||
[]
|
||||
withoutTemplateText
|
||||
conn.customList $"{Query.find Table.Theme} WHERE {idField} <> 'admin' ORDER BY {idField}" [] withoutTemplateText
|
||||
|
||||
/// Does a given theme exist?
|
||||
let exists (themeId: ThemeId) =
|
||||
@@ -43,7 +40,7 @@ type SQLiteThemeData(conn : SqliteConnection, log: ILogger) =
|
||||
/// Find a theme by its ID (excludes the text of templates)
|
||||
let findByIdWithoutText (themeId: ThemeId) =
|
||||
log.LogTrace "Theme.findByIdWithoutText"
|
||||
conn.customSingle (Query.Find.byId Table.Theme) [ idParam themeId ] withoutTemplateText
|
||||
conn.customSingle (Query.byId (Query.find Table.Theme) (string themeId)) [ idParam themeId ] withoutTemplateText
|
||||
|
||||
/// Delete a theme by its ID
|
||||
let delete themeId = backgroundTask {
|
||||
@@ -51,7 +48,8 @@ type SQLiteThemeData(conn : SqliteConnection, log: ILogger) =
|
||||
match! findByIdWithoutText themeId with
|
||||
| Some _ ->
|
||||
do! conn.customNonQuery
|
||||
$"DELETE FROM {Table.ThemeAsset} WHERE theme_id = @id; {Query.Delete.byId Table.Theme}"
|
||||
$"DELETE FROM {Table.ThemeAsset} WHERE theme_id = @id;
|
||||
{Query.byId (Query.delete Table.Theme) (string themeId)}"
|
||||
[ idParam themeId ]
|
||||
return true
|
||||
| None -> return false
|
||||
|
||||
Reference in New Issue
Block a user