# Caqti/ppx\_rapper tutorial

**URL:** <https://discuss.ocaml.org/t/caqti-ppx-rapper-tutorial/14056>\
**Category:** Learning\
**Created:** [February 11, 2024, 11:28am UTC](https://discuss.ocaml.org/t/caqti-ppx-rapper-tutorial/14056 "2024-02-11T11:28:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic\_Loyer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/frederic_loyer/32/3472_2.png) [@Frederic\_Loyer](https://discuss.ocaml.org/u/Frederic_Loyer)\
**Post date:** [February 11, 2024, 11:28am UTC](https://discuss.ocaml.org/t/caqti-ppx-rapper-tutorial/14056/1 "2024-02-11T11:28:41Z")

</div>

I propose the following tutorial

[https://www.sinerj.org/~loyer/caqti\_ppx\_rapper/caqti\_ppx\_rapper/index.html](https://www.sinerj.org/~loyer/caqti_ppx_rapper/caqti_ppx_rapper/index.html)

It is about Caqti and ppx\_rapper use. The tutorial also uses the `Lwt_result` monad and its `(let*)` binding operator. This avoid any explicit error handling.

I hope this will be interesting, and will be glad to get some advice to improve this first copy.

Perhaps I should add a section about processing a `list` of queries (ex: a query returns a list of item and we want to execute a new query for each row)

---

<div class="post-metadata">

**Author:** ![MarcCoquand](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/marccoquand/32/4901_2.png) [@MarcCoquand](https://discuss.ocaml.org/u/MarcCoquand)\
**Post date:** [February 11, 2024, 1:56pm UTC](https://discuss.ocaml.org/t/caqti-ppx-rapper-tutorial/14056/2 "2024-02-11T13:56:06Z")

</div>

Hey!

I think this is a great start. I recently asked about how to do transactions in Caqti with rapper, I think it would be awesome to include some usage examples of that as well.

---

<div class="post-metadata">

**Author:** ![Frederic\_Loyer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/frederic_loyer/32/3472_2.png) [@Frederic\_Loyer](https://discuss.ocaml.org/u/Frederic_Loyer)\
**Post date:** [February 11, 2024, 8:03pm UTC](https://discuss.ocaml.org/t/caqti-ppx-rapper-tutorial/14056/4 "2024-02-11T20:03:19Z")

</div>

The tutorial is updated (add the iteration/transaction section).

I was inspired by a neighbour thread…
