sql icon indicating copy to clipboard operation
sql copied to clipboard

does this pkg support `unquote-splicing`?

Open yanyingwang opened this issue 5 years ago • 1 comments

let's say I want to write code like this:

(define id-range '(1 10))

(select  id sd_id created_at updated_at 
            #:from users
            #:where (between-and id ,@id-range))

or like this:

(define columns '(id sd_id created_at updated_at))

(select ,@columns 
            #:from users
            #:where (= id 1))

yanyingwang avatar Jun 10 '19 09:06 yanyingwang

No, it doesn't, sorry. For the second example, you could use ScalarExpr:INJECT and turn the fields into a string (comma-separated) yourself.

rmculpepper avatar Aug 30 '19 13:08 rmculpepper