🐿️ Type safe SQL in Gleam
0

Configure Feed

Select the types of activity you want to include in your feed.

squirrel / birdie_snapshots / string_encoding.accepted
880 B 33 lines
1--- 2version: 1.1.8 3title: string encoding 4file: ./test/squirrel_test.gleam 5test_name: string_encoding_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/// Runs the `query` query 18/// defined in `query.sql`. 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, arg_1) { 24 let decoder = 25 decode.into({ 26 use res <- decode.parameter 27 QueryRow(res: res) 28 }) 29 |> decode.field(0, decode.bool) 30 31 "select true as res where $1 = 'wibble'" 32 |> pgo.execute(db, [pgo.text(arg_1)], decode.from(decoder, _)) 33}