From e8953d6072f1b09d08e71a23140a72bce7d010da Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Fri, 4 Jul 2025 11:06:34 -0400 Subject: [PATCH] Update deps; fix SQLite web log delete query --- src/MyWebLog.Data/MyWebLog.Data.fsproj | 14 +++++++------- src/MyWebLog.Data/SQLite/SQLiteWebLogData.fs | 20 ++++++++++---------- src/MyWebLog.Domain/MyWebLog.Domain.fsproj | 8 ++++---- src/MyWebLog.Tests/MyWebLog.Tests.fsproj | 4 ++-- src/MyWebLog/MyWebLog.fsproj | 12 ++++++------ 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/MyWebLog.Data/MyWebLog.Data.fsproj b/src/MyWebLog.Data/MyWebLog.Data.fsproj index 0039a09..d3a4842 100644 --- a/src/MyWebLog.Data/MyWebLog.Data.fsproj +++ b/src/MyWebLog.Data/MyWebLog.Data.fsproj @@ -5,17 +5,17 @@ - - - - - + + + + + - + - + diff --git a/src/MyWebLog.Data/SQLite/SQLiteWebLogData.fs b/src/MyWebLog.Data/SQLite/SQLiteWebLogData.fs index 40b7f6b..ddf0c98 100644 --- a/src/MyWebLog.Data/SQLite/SQLiteWebLogData.fs +++ b/src/MyWebLog.Data/SQLite/SQLiteWebLogData.fs @@ -9,17 +9,17 @@ open MyWebLog.Data /// SQLite myWebLog web log data implementation type SQLiteWebLogData(conn: SqliteConnection, log: ILogger) = - + /// Add a web log let add webLog = log.LogTrace "WebLog.add" conn.insert Table.WebLog webLog - + /// Retrieve all web logs let all () = log.LogTrace "WebLog.all" conn.findAll Table.WebLog - + /// Delete a web log by its ID let delete webLogId = log.LogTrace "WebLog.delete" @@ -34,21 +34,21 @@ type SQLiteWebLogData(conn: SqliteConnection, log: ILogger) = {Query.delete Table.Page} WHERE {webLogMatches}; {Query.delete Table.Category} WHERE {webLogMatches}; {Query.delete Table.TagMap} WHERE {webLogMatches}; - {Query.delete Table.Upload} WHERE web_log_id = @webLogId; {Query.delete Table.WebLogUser} WHERE {webLogMatches}; - {Query.delete Table.WebLog} WHERE {Query.whereById "@webLogId"}""" + {Query.delete Table.Upload} WHERE web_log_id = @webLogId; + {Query.delete Table.WebLog} WHERE data->>'Id' = @webLogId""" [ webLogParam webLogId ] - + /// Find a web log by its host (URL base) let findByHost (url: string) = log.LogTrace "WebLog.findByHost" conn.findFirstByFields Table.WebLog Any [ Field.Equal (nameof WebLog.Empty.UrlBase) url ] - + /// Find a web log by its ID let findById webLogId = log.LogTrace "WebLog.findById" conn.findById Table.WebLog webLogId - + /// Update redirect rules for a web log let updateRedirectRules (webLog: WebLog) = log.LogTrace "WebLog.updateRedirectRules" @@ -58,12 +58,12 @@ type SQLiteWebLogData(conn: SqliteConnection, log: ILogger) = let updateRssOptions (webLog: WebLog) = log.LogTrace "WebLog.updateRssOptions" conn.patchById Table.WebLog webLog.Id {| Rss = webLog.Rss |} - + /// Update settings for a web log let updateSettings (webLog: WebLog) = log.LogTrace "WebLog.updateSettings" conn.updateById Table.WebLog webLog.Id webLog - + interface IWebLogData with member _.Add webLog = add webLog member _.All () = all () diff --git a/src/MyWebLog.Domain/MyWebLog.Domain.fsproj b/src/MyWebLog.Domain/MyWebLog.Domain.fsproj index 32f4129..4d15a6f 100644 --- a/src/MyWebLog.Domain/MyWebLog.Domain.fsproj +++ b/src/MyWebLog.Domain/MyWebLog.Domain.fsproj @@ -7,11 +7,11 @@ - - + + - - + + diff --git a/src/MyWebLog.Tests/MyWebLog.Tests.fsproj b/src/MyWebLog.Tests/MyWebLog.Tests.fsproj index 934f55d..22986ab 100644 --- a/src/MyWebLog.Tests/MyWebLog.Tests.fsproj +++ b/src/MyWebLog.Tests/MyWebLog.Tests.fsproj @@ -26,9 +26,9 @@ - + - + diff --git a/src/MyWebLog/MyWebLog.fsproj b/src/MyWebLog/MyWebLog.fsproj index ddefdc9..6103574 100644 --- a/src/MyWebLog/MyWebLog.fsproj +++ b/src/MyWebLog/MyWebLog.fsproj @@ -33,14 +33,14 @@ - + - - - + + + - - + +