Fork me on GitHub
#honeysql
<
2022-11-01
>
markaddleman14:11:14

I’m writing a custom function to support BigQuery’s SAFE_OFFSET syntax. Normally, the function will produce a vector result like ["ARRAY[SAFE_OFFSET(?)]" idx] but when sql/format is called with :inline true, I’d like my function to return a result with arguments inlined. My stumbling block is honey.sql/*inline* is private. I don’t see another method of determining if the client wants an inline result.

seancorfield18:11:20

If you call format-expr on the argument to safe_offset, that will take care of the inlining for you.

markaddleman18:11:35

doh - of course. Thanks