mirror of
https://github.com/aantron/dream.git
synced 2025-06-24 00:02:27 -04:00
Compare commits
3 Commits
1.0.0-alph
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
27ff43177b | ||
|
204a792b57 | ||
|
da94944400 |
@ -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).
|
||||
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user