🐿️ Type safe SQL in Gleam
923 B
37 lines
1---
2version: 1.1.8
3title: query with multiline comment
4file: ./test/squirrel_test.gleam
5test_name: query_with_multiline_comment_test
6---
7/// A row you get from running the `query` query
8/// defined in `query.sql`.
9///
10/// > 🐿️ This type definition was generated automatically using v-test of the
11/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
12///
13pub type QueryRow {
14 QueryRow(res: Bool)
15}
16
17/// This is a comment
18/// that goes over multiple lines!
19///
20/// > 🐿️ This function was generated automatically using v-test of
21/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
22///
23pub fn query(db) {
24 let decoder =
25 decode.into({
26 use res <- decode.parameter
27 QueryRow(res: res)
28 })
29 |> decode.field(0, decode.bool)
30
31 "
32-- This is a comment
33-- that goes over multiple lines!
34select true as res
35"
36 |> pgo.execute(db, [], decode.from(decoder, _))
37}