From 715e545ed57c540d1a6866326f8069124e55833e Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Wed, 13 Dec 2023 14:17:53 -0500 Subject: [PATCH] Update deps - Add .NET 8 target - Remove ID param for Postgres doc calls --- src/Directory.Build.props | 2 +- src/MyWebLog.Data/MyWebLog.Data.fsproj | 16 ++++++---------- .../Postgres/PostgresCategoryData.fs | 2 +- src/MyWebLog.Data/Postgres/PostgresPageData.fs | 2 +- src/MyWebLog.Data/Postgres/PostgresPostData.fs | 2 +- src/MyWebLog.Data/Postgres/PostgresTagMapData.fs | 2 +- src/MyWebLog.Data/Postgres/PostgresThemeData.fs | 2 +- src/MyWebLog.Data/Postgres/PostgresWebLogData.fs | 2 +- .../Postgres/PostgresWebLogUserData.fs | 2 +- src/MyWebLog/MyWebLog.fsproj | 1 - 10 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index e376d97..548e37b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,6 +1,6 @@ - net6.0;net7.0 + net6.0;net7.0;net8.0 embedded 2.1.0.0 2.1.0.0 diff --git a/src/MyWebLog.Data/MyWebLog.Data.fsproj b/src/MyWebLog.Data/MyWebLog.Data.fsproj index 6a6ae75..707825c 100644 --- a/src/MyWebLog.Data/MyWebLog.Data.fsproj +++ b/src/MyWebLog.Data/MyWebLog.Data.fsproj @@ -5,21 +5,17 @@ - - - - + + + + - - + + - - - - diff --git a/src/MyWebLog.Data/Postgres/PostgresCategoryData.fs b/src/MyWebLog.Data/Postgres/PostgresCategoryData.fs index 244faed..5b703fa 100644 --- a/src/MyWebLog.Data/Postgres/PostgresCategoryData.fs +++ b/src/MyWebLog.Data/Postgres/PostgresCategoryData.fs @@ -122,7 +122,7 @@ type PostgresCategoryData (log : ILogger) = /// Save a category let save (cat : Category) = backgroundTask { log.LogTrace "Category.save" - do! save Table.Category (CategoryId.toString cat.Id) cat + do! save Table.Category cat } /// Restore categories from a backup diff --git a/src/MyWebLog.Data/Postgres/PostgresPageData.fs b/src/MyWebLog.Data/Postgres/PostgresPageData.fs index faa4c79..6feb078 100644 --- a/src/MyWebLog.Data/Postgres/PostgresPageData.fs +++ b/src/MyWebLog.Data/Postgres/PostgresPageData.fs @@ -145,7 +145,7 @@ type PostgresPageData (log : ILogger) = let save (page : Page) = backgroundTask { log.LogTrace "Page.save" let! oldPage = findFullById page.Id page.WebLogId - do! save Table.Page (PageId.toString page.Id) { page with Revisions = [] } + do! save Table.Page { page with Revisions = [] } do! updatePageRevisions page.Id (match oldPage with Some p -> p.Revisions | None -> []) page.Revisions () } diff --git a/src/MyWebLog.Data/Postgres/PostgresPostData.fs b/src/MyWebLog.Data/Postgres/PostgresPostData.fs index d3791de..ac676e7 100644 --- a/src/MyWebLog.Data/Postgres/PostgresPostData.fs +++ b/src/MyWebLog.Data/Postgres/PostgresPostData.fs @@ -175,7 +175,7 @@ type PostgresPostData (log : ILogger) = let save (post : Post) = backgroundTask { log.LogTrace "Post.save" let! oldPost = findFullById post.Id post.WebLogId - do! save Table.Post (PostId.toString post.Id) { post with Revisions = [] } + do! save Table.Post { post with Revisions = [] } do! updatePostRevisions post.Id (match oldPost with Some p -> p.Revisions | None -> []) post.Revisions } diff --git a/src/MyWebLog.Data/Postgres/PostgresTagMapData.fs b/src/MyWebLog.Data/Postgres/PostgresTagMapData.fs index 6c0aa52..210dc14 100644 --- a/src/MyWebLog.Data/Postgres/PostgresTagMapData.fs +++ b/src/MyWebLog.Data/Postgres/PostgresTagMapData.fs @@ -46,7 +46,7 @@ type PostgresTagMapData (log : ILogger) = /// Save a tag mapping let save (tagMap : TagMap) = - save Table.TagMap (TagMapId.toString tagMap.Id) tagMap + save Table.TagMap tagMap /// Restore tag mappings from a backup let restore (tagMaps : TagMap list) = backgroundTask { diff --git a/src/MyWebLog.Data/Postgres/PostgresThemeData.fs b/src/MyWebLog.Data/Postgres/PostgresThemeData.fs index 00af329..cf3a569 100644 --- a/src/MyWebLog.Data/Postgres/PostgresThemeData.fs +++ b/src/MyWebLog.Data/Postgres/PostgresThemeData.fs @@ -47,7 +47,7 @@ type PostgresThemeData (log : ILogger) = /// Save a theme let save (theme : Theme) = log.LogTrace "Theme.save" - save Table.Theme (ThemeId.toString theme.Id) theme + save Table.Theme theme interface IThemeData with member _.All () = all () diff --git a/src/MyWebLog.Data/Postgres/PostgresWebLogData.fs b/src/MyWebLog.Data/Postgres/PostgresWebLogData.fs index ef6020c..f583cc2 100644 --- a/src/MyWebLog.Data/Postgres/PostgresWebLogData.fs +++ b/src/MyWebLog.Data/Postgres/PostgresWebLogData.fs @@ -11,7 +11,7 @@ type PostgresWebLogData (log : ILogger) = /// Add a web log let add (webLog : WebLog) = log.LogTrace "WebLog.add" - insert Table.WebLog (WebLogId.toString webLog.Id) webLog + insert Table.WebLog webLog /// Retrieve all web logs let all () = diff --git a/src/MyWebLog.Data/Postgres/PostgresWebLogUserData.fs b/src/MyWebLog.Data/Postgres/PostgresWebLogUserData.fs index 80eeee3..32b912e 100644 --- a/src/MyWebLog.Data/Postgres/PostgresWebLogUserData.fs +++ b/src/MyWebLog.Data/Postgres/PostgresWebLogUserData.fs @@ -85,7 +85,7 @@ type PostgresWebLogUserData (log : ILogger) = /// Save a user let save (user : WebLogUser) = log.LogTrace "WebLogUser.save" - save Table.WebLogUser (WebLogUserId.toString user.Id) user + save Table.WebLogUser user interface IWebLogUserData with member _.Add user = save user diff --git a/src/MyWebLog/MyWebLog.fsproj b/src/MyWebLog/MyWebLog.fsproj index 7b21a1c..a270487 100644 --- a/src/MyWebLog/MyWebLog.fsproj +++ b/src/MyWebLog/MyWebLog.fsproj @@ -31,7 +31,6 @@ -