Compare commits

...

3 Commits

Author SHA1 Message Date
Anton Bachin
27ff43177b
Typo in README.md 2024-12-20 11:18:22 +03:00
Mostafa Touny
204a792b57
example/h-sql: tup2 is deprecated (#370) 2024-12-17 12:47:11 +03:00
asymmetric
da94944400
example/w-template-logic: explain % (#366) 2024-12-10 14:08:48 +03:00
3 changed files with 4 additions and 2 deletions

View File

@ -217,7 +217,7 @@ Apart from the [issues](https://github.com/aantron/dream/issues), good places
to discuss Dream are...
- #dream on the [Reason Discord](https://discord.gg/2JTYRq2rYh).
- #webdev on the [OCaml Discord](https://discord.gg/sx45hPkkWV)
- #webdev on the [OCaml Discord](https://discord.gg/sx45hPkkWV).
- The [OCaml Discuss forum](https://discuss.ocaml.org/).
- The development stream on [Twitch](https://www.twitch.tv/antron_ML).

View File

@ -14,7 +14,7 @@ module T = Caqti_type
let list_comments =
let query =
let open Caqti_request.Infix in
(T.unit ->* T.(tup2 int string))
(T.unit ->* T.(t2 int string))
"SELECT id, text FROM comment" in
fun (module Db : DB) ->
let%lwt comments_or_error = Db.collect_list query () in

View File

@ -11,6 +11,8 @@ imperatively. That means that template fragments evaluate to `unit`, and the
surrounding OCaml code often needs semicolons. Templates also tend to use
`List.iter` rather than `List.map`.
The `%` and `<%`/`%>` syntax is documented [in the manual](https://aantron.github.io/dream/#templates).
```ocaml
let render_home tasks =
<html>