From 3e61aaf9e6f5e1ffdba2f7278a18c3a217254fc9 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Mon, 4 Mar 2024 06:56:36 -0600 Subject: Fixing some more errors --- posts/awk-with-kakoune.njk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posts/awk-with-kakoune.njk b/posts/awk-with-kakoune.njk index 82428c6..ea854e1 100644 --- a/posts/awk-with-kakoune.njk +++ b/posts/awk-with-kakoune.njk @@ -21,9 +21,9 @@ class="sourceCode ocaml"> FROM users WHERE username <> %string{wrong_user} AND id > %int{min_id} |sql}] -

my_query becomes a function that takes an +

my_query becomes a function that takes string, int and sql_connection and returns an n-tuple, -(int,string,bool,string). This can be hard to work with, especially a larger query can return many values of the same type and it becomes easy to mix them up. If you have a record type defined +(int,string,bool,string). Tuples can be hard to work with, especially a larger query can return many values of the same type, it becomes easy to mix them up. If you have a record type defined that looks exactly the same as the return type of the SQL statement, you can therefore add a record_out statement, which ppx_rapper will handle and automatically return a record that matches its structure instead of a tuple:

-- cgit v1.2.3