diff options
author | Marc Coquand <marc@mccd.space> | 2024-03-04 06:56:36 -0600 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-03-04 06:56:36 -0600 |
commit | 3e61aaf9e6f5e1ffdba2f7278a18c3a217254fc9 (patch) | |
tree | 396a9f6ef3f623dbd07600251541af2c1ddc884a /posts | |
parent | 455dae7a13008dab0ebb292ac74fb00db197974c (diff) | |
download | mccd.space-3e61aaf9e6f5e1ffdba2f7278a18c3a217254fc9.tar.gz mccd.space-3e61aaf9e6f5e1ffdba2f7278a18c3a217254fc9.tar.bz2 mccd.space-3e61aaf9e6f5e1ffdba2f7278a18c3a217254fc9.zip |
Fixing some more errors
Diffstat (limited to '')
-rw-r--r-- | posts/awk-with-kakoune.njk | 4 |
1 files 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"><code class="sourceCode ocaml"><span id="cb1-1"><a href <span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a> FROM users</span> <span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a> WHERE username <> %<span class="dt">string</span>{wrong_user} AND id > %<span class="dt">int</span>{min_id}</span> <span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a> |sql}]</span></code></pre></div> -<p><code>my_query</code> becomes a function that takes an +<p><code>my_query</code> becomes a function that takes <code>string</code>, <code>int</code> and <code>sql_connection</code> and returns an n-tuple, -<code>(int,string,bool,string)</code>. 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 +<code>(int,string,bool,string)</code>. 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 <code>record_out</code> statement, which ppx_rapper will handle and automatically return a record that matches its structure instead of a tuple:</p> |