Skip to content

Commit

Permalink
readme quick start
Browse files Browse the repository at this point in the history
  • Loading branch information
pimbrouwers committed Dec 2, 2024
1 parent e1567cc commit 0d7b7d0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d7b7d0

Please sign in to comment.