From 0d7b7d04d80c7181b87ffdc7f866dca659ce1cd0 Mon Sep 17 00:00:00 2001 From: Pim Brouwers Date: Mon, 2 Dec 2024 07:39:22 -0500 Subject: [PATCH] readme quick start --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6304241..1e3780e 100644 --- a/README.md +++ b/README.md @@ -43,18 +43,21 @@ dotnet add package Donald open Donald type Author = - { FullName : string } + { AuthorId : int + FullName : string } let authors (conn : IDbConnection) : Author list = conn |> Db.newCommand " - SELECT full_name + SELECT author_id + , full_name FROM author - WHERE author_id = @author_id" + WHERE book_count >= @book_count" |> Db.setParams [ - "author_id", SqlType.Int32 1 ] + "book_count", SqlType.Int32 3 ] |> Db.query (fun rd -> - { FullName = rd.ReadString "full_name" }) + { AuthorId = rd.ReadInt "author_id" + FullName = rd.ReadString "full_name" }) ``` ## An Example using SQLite