This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-05
Channels
- # adventofcode (138)
- # announcements (1)
- # babashka (4)
- # beginners (71)
- # biff (2)
- # calva (7)
- # cider (20)
- # clj-kondo (4)
- # cljsrn (4)
- # clojure (36)
- # clojure-europe (37)
- # clojure-nl (2)
- # clojure-norway (27)
- # clojure-portugal (1)
- # clojure-uk (4)
- # clojurescript (8)
- # emacs (3)
- # graphql (1)
- # hugsql (4)
- # humbleui (6)
- # hyperfiddle (1)
- # jobs-discuss (18)
- # joyride (2)
- # malli (17)
- # meander (7)
- # membrane (8)
- # off-topic (16)
- # pathom (14)
- # portal (4)
- # rdf (36)
- # reitit (4)
- # releases (2)
- # remote-jobs (1)
- # scittle (15)
- # shadow-cljs (13)
- # tools-deps (40)
Hello! So to avoid having to convert the data type at the Clojure level I'm frequently setting the type of my ids using hugsql ::integer, for example
- :name list-all-tasks :? :*
-- :doc list all task deets for a page
select * from task
where page_ref = :page_ref::integer
However, not sure how I can do that with a vector like:
(:v*:task_ids)
If you're using postgresql, instead of page_ref in (:v*:task_ids)
use page_ref = any(array[:v*:task_ids]::integer[])
.
That works Curtis. Great!