···70 // Start all essential processes under a supervision tree
71 let assert Ok(_) =
72 supervision_tree.start(
73- ctx:,
74 pog_config:,
75 wisp_handler:,
76 ws_handler:,
···70 // Start all essential processes under a supervision tree
71 let assert Ok(_) =
72 supervision_tree.start(
073 pog_config:,
74 wisp_handler:,
75 ws_handler:,
···131 "medic_emergency" -> decode.success(MedicEmergency)
132 _ -> decode.failure(Other, "OccurrenceCategoryEnum")
133 }
134-}/// Corresponds to the Postgres `occurrence_priority_enum` enum.
00135///
136/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
137/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···150 "low" -> decode.success(Low)
151 _ -> decode.failure(High, "OccurrencePriorityEnum")
152 }
153-}/// Corresponds to the Postgres `occurrence_subcategory_enum` enum.
00154///
155/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
156/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···174 HeartStop
175}
176177-fn occurrence_subcategory_enum_decoder() -> decode.Decoder(OccurrenceSubcategoryEnum) {
00178 use occurrence_subcategory_enum <- decode.then(decode.string)
179 case occurrence_subcategory_enum {
180 "injured_animal" -> decode.success(InjuredAnimal)
···195 "heart_stop" -> decode.success(HeartStop)
196 _ -> decode.failure(InjuredAnimal, "OccurrenceSubcategoryEnum")
197 }
198-}/// Corresponds to the Postgres `user_role_enum` enum.
00199///
200/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
201/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···131 "medic_emergency" -> decode.success(MedicEmergency)
132 _ -> decode.failure(Other, "OccurrenceCategoryEnum")
133 }
134+}
135+136+/// Corresponds to the Postgres `occurrence_priority_enum` enum.
137///
138/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
139/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···152 "low" -> decode.success(Low)
153 _ -> decode.failure(High, "OccurrencePriorityEnum")
154 }
155+}
156+157+/// Corresponds to the Postgres `occurrence_subcategory_enum` enum.
158///
159/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
160/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···178 HeartStop
179}
180181+fn occurrence_subcategory_enum_decoder() -> decode.Decoder(
182+ OccurrenceSubcategoryEnum,
183+) {
184 use occurrence_subcategory_enum <- decode.then(decode.string)
185 case occurrence_subcategory_enum {
186 "injured_animal" -> decode.success(InjuredAnimal)
···201 "heart_stop" -> decode.success(HeartStop)
202 _ -> decode.failure(InjuredAnimal, "OccurrenceSubcategoryEnum")
203 }
204+}
205+206+/// Corresponds to the Postgres `user_role_enum` enum.
207///
208/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
209/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
+18-12
src/app/domain/occurrence/sql.gleam
···41"
42 |> pog.query
43 |> pog.parameter(pog.text(uuid.to_string(arg_1)))
44- |> pog.parameter(
45- pog.array(fn(value) { pog.text(uuid.to_string(value)) }, arg_2),
46- )
047 |> pog.returning(decoder)
48 |> pog.execute(db)
49}
···464"
465 |> pog.query
466 |> pog.parameter(pog.text(uuid.to_string(arg_1)))
467- |> pog.parameter(
468- pog.array(fn(value) { pog.text(uuid.to_string(value)) }, arg_2),
469- )
0470 |> pog.returning(decoder)
471 |> pog.execute(db)
472}
···551 MedicEmergency -> "medic_emergency"
552 }
553 |> pog.text
554-}/// Corresponds to the Postgres `occurrence_priority_enum` enum.
00555///
556/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
557/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···579 Low -> "low"
580 }
581 |> pog.text
582-}/// Corresponds to the Postgres `occurrence_subcategory_enum` enum.
00583///
584/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
585/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···603 HeartStop
604}
605606-fn occurrence_subcategory_enum_decoder() -> decode.Decoder(OccurrenceSubcategoryEnum) {
00607 use occurrence_subcategory_enum <- decode.then(decode.string)
608 case occurrence_subcategory_enum {
609 "injured_animal" -> decode.success(InjuredAnimal)
···626 }
627}
628629-fn occurrence_subcategory_enum_encoder(
630- occurrence_subcategory_enum,
631-) -> pog.Value {
632 case occurrence_subcategory_enum {
633 InjuredAnimal -> "injured_animal"
634 Flood -> "flood"
···41"
42 |> pog.query
43 |> pog.parameter(pog.text(uuid.to_string(arg_1)))
44+ |> pog.parameter(pog.array(
45+ fn(value) { pog.text(uuid.to_string(value)) },
46+ arg_2,
47+ ))
48 |> pog.returning(decoder)
49 |> pog.execute(db)
50}
···465"
466 |> pog.query
467 |> pog.parameter(pog.text(uuid.to_string(arg_1)))
468+ |> pog.parameter(pog.array(
469+ fn(value) { pog.text(uuid.to_string(value)) },
470+ arg_2,
471+ ))
472 |> pog.returning(decoder)
473 |> pog.execute(db)
474}
···553 MedicEmergency -> "medic_emergency"
554 }
555 |> pog.text
556+}
557+558+/// Corresponds to the Postgres `occurrence_priority_enum` enum.
559///
560/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
561/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···583 Low -> "low"
584 }
585 |> pog.text
586+}
587+588+/// Corresponds to the Postgres `occurrence_subcategory_enum` enum.
589///
590/// > 🐿️ This type definition was generated automatically using v4.6.0 of the
591/// > [squirrel package](https://github.com/giacomocavalieri/squirrel).
···609 HeartStop
610}
611612+fn occurrence_subcategory_enum_decoder() -> decode.Decoder(
613+ OccurrenceSubcategoryEnum,
614+) {
615 use occurrence_subcategory_enum <- decode.then(decode.string)
616 case occurrence_subcategory_enum {
617 "injured_animal" -> decode.success(InjuredAnimal)
···634 }
635}
636637+fn occurrence_subcategory_enum_encoder(occurrence_subcategory_enum) -> pog.Value {
00638 case occurrence_subcategory_enum {
639 InjuredAnimal -> "injured_animal"
640 Flood -> "flood"