🐿️ Type safe SQL in Gleam
0

Configure Feed

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

squirrel / birdie_snapshots / float_decoding.accepted
837 B 33 lines
1--- 2version: 1.1.8 3title: float decoding 4file: ./test/squirrel_test.gleam 5test_name: float_decoding_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: Float) 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) { 24 let decoder = 25 decode.into({ 26 use res <- decode.parameter 27 QueryRow(res: res) 28 }) 29 |> decode.field(0, decode.float) 30 31 "select 1.1 as res" 32 |> pgo.execute(db, [], decode.from(decoder, _)) 33}