···44file: ./test/squirrel_test.gleam
55test_name: array_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: List(Int))
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.list(decode.int))
-17
birdie_snapshots/array_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: array_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/bool_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: bool_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/bool_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: bool_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/bytea_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: bytea_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: BitArray)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bit_array)
-17
birdie_snapshots/bytea_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: bytea_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/char_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: char_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: String)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.string)
-17
birdie_snapshots/char_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: char_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/date_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: date_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/time/calendar.{type Date}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(res: Date)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use res <- decode.field(0, pog.calendar_date_decoder())
-17
birdie_snapshots/date_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: date_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
···44file: ./test/squirrel_test.gleam
55test_name: decode_success_with_long_builder_close_to_80_chars_is_properly_formatted_not_breaking_it_on_a_different_line_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(aaaaaaaa: Int, bbbbbbbbbbbbbbb: Int, ccc: Int, dddddddddddddddd: Int)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use aaaaaaaa <- decode.field(0, decode.int)
···44file: ./test/squirrel_test.gleam
55test_name: decode_success_with_long_builder_is_properly_formatted_not_breaking_it_on_a_different_line_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(
2413 first_column: Int,
···3019 )
3120}
32213333-/// Runs the `query` query
3434-/// defined in `query.sql`.
3535-///
3636-/// > 🐿️ This function was generated automatically using v-test of
3737-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3838-///
3922pub fn query(db) {
4023 let decoder = {
4124 use first_column <- decode.field(0, decode.int)
-23
birdie_snapshots/enum_array_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: enum_array_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: List(SquirrelColour))
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.list(squirrel_colour_decoder()))
···4124 |> pog.execute(db)
4225}
43264444-// --- Enums -------------------------------------------------------------------
45274646-/// Corresponds to the Postgres `squirrel_colour` enum.
4747-///
4848-/// > 🐿️ This type definition was generated automatically using v-test of the
4949-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
5050-///
5128pub type SquirrelColour {
5229 LightBrown
5330 Grey
-23
birdie_snapshots/enum_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: enum_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(squirrel_colour: SquirrelColour)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use squirrel_colour <- decode.field(0, squirrel_colour_decoder())
···4124 |> pog.execute(db)
4225}
43264444-// --- Enums -------------------------------------------------------------------
45274646-/// Corresponds to the Postgres `squirrel_colour` enum.
4747-///
4848-/// > 🐿️ This type definition was generated automatically using v-test of the
4949-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
5050-///
5128pub type SquirrelColour {
5229 LightBrown
5330 Grey
-23
birdie_snapshots/enum_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: enum_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Int)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.int)
···4225 |> pog.execute(db)
4326}
44274545-// --- Enums -------------------------------------------------------------------
46284747-/// Corresponds to the Postgres `squirrel_colour` enum.
4848-///
4949-/// > 🐿️ This type definition was generated automatically using v-test of the
5050-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
5151-///
5229pub type SquirrelColour {
5330 LightBrown
5431 Grey
···44file: ./test/squirrel_test.gleam
55test_name: fields_appear_in_the_order_they_have_in_the_select_list_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(first: Bool, second: Int, third: String)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use first <- decode.field(0, decode.bool)
-17
birdie_snapshots/float4_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: float4_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Float)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.float)
-17
birdie_snapshots/float4_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: float4_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/float8_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: float8_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Float)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.float)
-17
birdie_snapshots/float8_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: float8_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
···44file: ./test/squirrel_test.gleam
55test_name: full_join_columns_are_optional_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/option.{type Option}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(optional1: Option(String), optional2: Option(String))
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use optional1 <- decode.field(0, decode.optional(decode.string))
···44file: ./test/squirrel_test.gleam
55test_name: generated_type_fields_are_labelled_with_their_name_in_the_select_list_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/option.{type Option}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(acorns: Option(Int), squirrel_name: String)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use acorns <- decode.field(0, decode.optional(decode.int))
···44file: ./test/squirrel_test.gleam
55test_name: generated_type_has_the_same_name_as_the_function_but_in_pascal_case_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
···44file: ./test/squirrel_test.gleam
55test_name: insert_with_no_returned_values_returns_just_nil_and_doesnt_define_a_type_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// Runs the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This function was generated automatically using v-test of
2020-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub fn query(db) {
2312 let decoder = decode.map(decode.dynamic, fn(_) { Nil })
2413
-17
birdie_snapshots/int_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: int_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Int)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.int)
-17
birdie_snapshots/int_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: int_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/json_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: json_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: String)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.string)
-11
birdie_snapshots/json_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: json_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/json
1510import pog
16111717-/// Runs the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This function was generated automatically using v-test of
2121-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub fn query(db, arg_1) {
2413 let decoder = decode.map(decode.dynamic, fn(_) { Nil })
2514
-17
birdie_snapshots/jsonb_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: jsonb_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: String)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.string)
-11
birdie_snapshots/jsonb_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: jsonb_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/json
1510import pog
16111717-/// Runs the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This function was generated automatically using v-test of
2121-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub fn query(db, arg_1) {
2413 let decoder = decode.map(decode.dynamic, fn(_) { Nil })
2514
···44file: ./test/squirrel_test.gleam
55test_name: left_join_columns_are_optional_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/option.{type Option}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(not_optional: String, optional: Option(String))
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use not_optional <- decode.field(0, decode.string)
···44file: ./test/squirrel_test.gleam
55test_name: left_join_nullability_inference_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/option.{type Option}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(user_id: Int, roles: Option(String))
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use user_id <- decode.field(0, decode.int)
···44file: ./test/squirrel_test.gleam
55test_name: nullability_with_foreign_key_condition_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/option.{type Option}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(item_id: Int, name: Option(String))
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db, arg_1) {
3417 let decoder = {
3518 use item_id <- decode.field(0, decode.int)
-17
birdie_snapshots/numeric_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: numeric_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Float)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, pog.numeric_decoder())
-17
birdie_snapshots/numeric_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: numeric_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/optional_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: optional_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/option.{type Option}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(acorns: Option(Int))
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use acorns <- decode.field(0, decode.optional(decode.int))
···44file: ./test/squirrel_test.gleam
55test_name: queries_are_sorted_alphabetically_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `first` query
1717-/// defined in `first.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type FirstRow {
2312 FirstRow(wibble: Int)
2413}
25142626-/// Runs the `first` query
2727-/// defined in `first.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn first(db) {
3316 let decoder = {
3417 use wibble <- decode.field(0, decode.int)
···4124 |> pog.execute(db)
4225}
43264444-/// A row you get from running the `last` query
4545-/// defined in `last.sql`.
4646-///
4747-/// > 🐿️ This type definition was generated automatically using v-test of the
4848-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
4949-///
5027pub type LastRow {
5128 LastRow(wibble: Int)
5229}
53305454-/// Runs the `last` query
5555-/// defined in `last.sql`.
5656-///
5757-/// > 🐿️ This function was generated automatically using v-test of
5858-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
5959-///
6031pub fn last(db) {
6132 let decoder = {
6233 use wibble <- decode.field(0, decode.int)
···44file: ./test/squirrel_test.gleam
55test_name: query_starting_with_a_semicolon_does_not_crash_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(result: Int)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use result <- decode.field(0, decode.int)
···44file: ./test/squirrel_test.gleam
55test_name: query_that_needs_more_than_a_single_helper_function_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/time/calendar.{type Date}
1510import pog
1611import youid/uuid.{type Uuid}
17121818-/// A row you get from running the `query` query
1919-/// defined in `query.sql`.
2020-///
2121-/// > 🐿️ This type definition was generated automatically using v-test of the
2222-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2323-///
2413pub type QueryRow {
2514 QueryRow(gen_random_uuid: Uuid, date: Date)
2615}
27162828-/// Runs the `query` query
2929-/// defined in `query.sql`.
3030-///
3131-/// > 🐿️ This function was generated automatically using v-test of
3232-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3333-///
3417pub fn query(db) {
3518 let decoder = {
3619 use gen_random_uuid <- decode.field(0, uuid_decoder())
···4427 |> pog.execute(db)
4528}
46294747-// --- Encoding/decoding utils -------------------------------------------------
48304949-/// A decoder to decode `Uuid`s coming from a Postgres query.
5050-///
5131fn uuid_decoder() {
5232 use bit_array <- decode.then(decode.bit_array)
5333 case uuid.from_bit_array(bit_array) {
···44file: ./test/squirrel_test.gleam
55test_name: query_that_needs_utils_and_enums_has_two_sections_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/time/calendar.{type Date}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(squirrel_colour: SquirrelColour, date: Date)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use squirrel_colour <- decode.field(0, squirrel_colour_decoder())
···4326 |> pog.execute(db)
4427}
45284646-// --- Enums -------------------------------------------------------------------
47294848-/// Corresponds to the Postgres `squirrel_colour` enum.
4949-///
5050-/// > 🐿️ This type definition was generated automatically using v-test of the
5151-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
5252-///
5330pub type SquirrelColour {
5431 LightBrown
5532 Grey
···44file: ./test/squirrel_test.gleam
55test_name: query_with_quoted_string_is_properly_escaped_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(result: Int)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use result <- decode.field(0, decode.int)
···44file: ./test/squirrel_test.gleam
55test_name: recursive_common_table_query_with_semi_join_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
1510import youid/uuid.{type Uuid}
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(id: Uuid, name: String)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db, arg_1) {
3417 let decoder = {
3518 use id <- decode.field(0, uuid_decoder())
···5942 |> pog.execute(db)
6043}
61446262-// --- Encoding/decoding utils -------------------------------------------------
63456464-/// A decoder to decode `Uuid`s coming from a Postgres query.
6565-///
6646fn uuid_decoder() {
6747 use bit_array <- decode.then(decode.bit_array)
6848 case uuid.from_bit_array(bit_array) {
···44file: ./test/squirrel_test.gleam
55test_name: right_join_columns_are_optional_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/option.{type Option}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(optional: Option(String), not_optional: String)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use optional <- decode.field(0, decode.optional(decode.string))
···44file: ./test/squirrel_test.gleam
55test_name: squirrel_supports_do_blocks_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// Runs the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This function was generated automatically using v-test of
2020-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub fn query(db) {
2312 let decoder = decode.map(decode.dynamic, fn(_) { Nil })
2413
-17
birdie_snapshots/string_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: string_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: String)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.string)
-17
birdie_snapshots/string_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: string_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/time_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: time_of_day_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/time/calendar.{type TimeOfDay}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(res: TimeOfDay)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use res <- decode.field(0, pog.calendar_time_of_day_decoder())
-17
birdie_snapshots/time_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: time_of_day_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/timestamp_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: timestamp_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import gleam/time/timestamp.{type Timestamp}
1510import pog
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(res: Timestamp)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use res <- decode.field(0, pog.timestamp_decoder())
-17
birdie_snapshots/timestamp_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: timestamp_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
···44file: ./test/squirrel_test.gleam
55test_name: using_uuids_more_than_once_results_in_a_single_uuid_decoder_helper_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
1510import youid/uuid.{type Uuid}
16111717-/// A row you get from running the `one` query
1818-/// defined in `one.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type OneRow {
2413 OneRow(gen_random_uuid: Uuid)
2514}
26152727-/// Runs the `one` query
2828-/// defined in `one.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn one(db) {
3417 let decoder = {
3518 use gen_random_uuid <- decode.field(0, uuid_decoder())
···4225 |> pog.execute(db)
4326}
44274545-/// A row you get from running the `other` query
4646-/// defined in `other.sql`.
4747-///
4848-/// > 🐿️ This type definition was generated automatically using v-test of the
4949-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
5050-///
5128pub type OtherRow {
5229 OtherRow(gen_random_uuid: Uuid)
5330}
54315555-/// Runs the `other` query
5656-/// defined in `other.sql`.
5757-///
5858-/// > 🐿️ This function was generated automatically using v-test of
5959-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
6060-///
6132pub fn other(db) {
6233 let decoder = {
6334 use gen_random_uuid <- decode.field(0, uuid_decoder())
···7041 |> pog.execute(db)
7142}
72437373-// --- Encoding/decoding utils -------------------------------------------------
74447575-/// A decoder to decode `Uuid`s coming from a Postgres query.
7676-///
7745fn uuid_decoder() {
7846 use bit_array <- decode.then(decode.bit_array)
7947 case uuid.from_bit_array(bit_array) {
-20
birdie_snapshots/uuid_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: uuid_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
1510import youid/uuid.{type Uuid}
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(res: Uuid)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db) {
3417 let decoder = {
3518 use res <- decode.field(0, uuid_decoder())
···4225 |> pog.execute(db)
4326}
44274545-// --- Encoding/decoding utils -------------------------------------------------
46284747-/// A decoder to decode `Uuid`s coming from a Postgres query.
4848-///
4929fn uuid_decoder() {
5030 use bit_array <- decode.then(decode.bit_array)
5131 case uuid.from_bit_array(bit_array) {
-17
birdie_snapshots/uuid_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: uuid_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
1510import youid/uuid
16111717-/// A row you get from running the `query` query
1818-/// defined in `query.sql`.
1919-///
2020-/// > 🐿️ This type definition was generated automatically using v-test of the
2121-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2222-///
2312pub type QueryRow {
2413 QueryRow(res: Bool)
2514}
26152727-/// Runs the `query` query
2828-/// defined in `query.sql`.
2929-///
3030-/// > 🐿️ This function was generated automatically using v-test of
3131-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3232-///
3316pub fn query(db, arg_1) {
3417 let decoder = {
3518 use res <- decode.field(0, decode.bool)
-17
birdie_snapshots/varchar_decoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: varchar_decoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: String)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.string)
-17
birdie_snapshots/varchar_encoding.accepted
···44file: ./test/squirrel_test.gleam
55test_name: varchar_encoding_test
66---
77-//// This module contains the code to run the sql queries defined in
88-//// `./test-directory`.
99-//// > 🐿️ This module was generated automatically using v-test of
1010-//// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
1111-////
127138import gleam/dynamic/decode
149import pog
15101616-/// A row you get from running the `query` query
1717-/// defined in `query.sql`.
1818-///
1919-/// > 🐿️ This type definition was generated automatically using v-test of the
2020-/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
2121-///
2211pub type QueryRow {
2312 QueryRow(res: Bool)
2413}
25142626-/// Runs the `query` query
2727-/// defined in `query.sql`.
2828-///
2929-/// > 🐿️ This function was generated automatically using v-test of
3030-/// > the [squirrel package](https://github.com/giacomocavalieri/squirrel).
3131-///
3215pub fn query(db, arg_1) {
3316 let decoder = {
3417 use res <- decode.field(0, decode.bool)
+48-11
test/squirrel_test.gleam
···201201 should_codegen_queries([#("query", query)])
202202}
203203204204+fn should_codegen_with_comments(query: String) {
205205+ should_codegen_queries_options(
206206+ [#("query", query)],
207207+ CodegenOptions(strip_comments: False),
208208+ )
209209+}
210210+204211fn should_codegen_queries(queries: List(#(String, String))) -> String {
212212+ should_codegen_queries_options(queries, CodegenOptions(strip_comments: True))
213213+}
214214+215215+fn should_codegen_queries_with_comments(
216216+ queries: List(#(String, String)),
217217+) -> String {
218218+ should_codegen_queries_options(queries, CodegenOptions(strip_comments: False))
219219+}
220220+221221+fn should_codegen_queries_options(
222222+ queries: List(#(String, String)),
223223+ options: CodegenOptions,
224224+) {
205225 // We assert everything went smoothly and we have no errors in the query.
206226 let assert Ok(#(queries, [])) = type_queries(queries)
207207- query.generate_code("v-test", for: queries, from: "./test-directory")
227227+ let code =
228228+ query.generate_code("v-test", for: queries, from: "./test-directory")
229229+230230+ let CodegenOptions(strip_comments:) = options
231231+ case strip_comments {
232232+ False -> code
233233+ True ->
234234+ string.split(code, on: "\n")
235235+ |> list.filter(keeping: fn(line) { !string.starts_with(line, "//") })
236236+ |> string.join(with: "\n")
237237+ }
238238+}
239239+240240+type CodegenOptions {
241241+ CodegenOptions(
242242+ /// Removes all lines starting with `//` from the generated code.
243243+ strip_comments: Bool,
244244+ )
208245}
209246210247fn type_queries(
···515552-- This is a comment
516553select true as res
517554"
518518- |> should_codegen
555555+ |> should_codegen_with_comments
519556 |> birdie.snap(title: "query with comment")
520557}
521558···525562-- that goes over multiple lines!
526563select true as res
527564"
528528- |> should_codegen
565565+ |> should_codegen_with_comments
529566 |> birdie.snap(title: "query with multiline comment")
530567}
531568···727764//
728765729766pub fn checking_two_identical_snippets_of_code_test() {
730730- let code = should_codegen("select 1 as number")
767767+ let code = should_codegen_with_comments("select 1 as number")
731768 let assert squirrel.Same = squirrel.compare_code_snippets(code, code)
732769}
733770734771pub fn if_code_snippets_differ_by_formatting_they_are_the_same_test() {
735735- let expected_code = should_codegen("select 1 as number")
772772+ let expected_code = should_codegen_with_comments("select 1 as number")
736773 let actual_code = expected_code |> string.replace(each: "\n", with: "\n ")
737774 let assert squirrel.Same =
738775 squirrel.compare_code_snippets(expected_code, actual_code)
739776}
740777741778pub fn if_code_snippets_differ_by_comments_they_are_the_same_test() {
742742- let expected_code = should_codegen("select 1 as number")
779779+ let expected_code = should_codegen_with_comments("select 1 as number")
743780 let actual_code = "// Comment!\n" <> expected_code
744781 let assert squirrel.Same =
745782 squirrel.compare_code_snippets(expected_code, actual_code)
746783}
747784748785pub fn comparing_different_snippets_of_code_test() {
749749- let expected_code = should_codegen("select 1 as number")
750750- let actual_code = should_codegen("select 2 as number")
786786+ let expected_code = should_codegen_with_comments("select 1 as number")
787787+ let actual_code = should_codegen_with_comments("select 2 as number")
751788 let assert squirrel.Different =
752789 squirrel.compare_code_snippets(expected_code, actual_code)
753790}
···788825789826// https://github.com/giacomocavalieri/squirrel/issues/29
790827pub fn there_is_only_one_empty_line_between_code_generated_for_different_queries_test() {
791791- should_codegen_queries([
828828+ should_codegen_queries_with_comments([
792829 #("one", "select 1 as res"),
793830 #("two", "select 2 as res"),
794831 ])
···884921pub fn file_with_squirrel_module_comment_is_considered_as_generated_test() {
885922 assert squirrel.LikelyGenerated
886923 == "select 1 as wibble"
887887- |> should_codegen
924924+ |> should_codegen_with_comments
888925 |> squirrel.classify_file_content
889926}
890927891928pub fn file_with_squirrel_function_comment_is_considered_as_generated_test() {
892929 assert squirrel.LikelyGenerated
893930 == "select 1 as wibble"
894894- |> should_codegen
931931+ |> should_codegen_with_comments
895932 // We remove the starting module comment, since we want to make sure
896933 // squirrel can pick up a generated file even if that bit is missing!
897934 |> string.split(on: "\n")