r0man / sqlingvo

A Clojure & ClojureScript DSL for SQL
Eclipse Public License 1.0
210 stars 23 forks source link

Cast as schema-qualified type #104

Closed deepxg closed 6 years ago

deepxg commented 6 years ago

The schema gets cut off expressions like:

'(cast "value" :custom_schema.custom_type)

This can be fixed by checking the value using the :form or :val from the cast expression in the compiler but I wondered if there was a higher level fix that would work better. When the expression is parsed it's interpreted as a function call and the last argument as a table/column name, so perhaps there's an abstraction missing, albeit for quite a small edge-case.

r0man commented 6 years ago

Hey deepxg. There is parse-colum which you could use.

On Sat, Mar 24, 2018, 22:06 Deep xG notifications@github.com wrote:

The schema gets cut off expressions like:

'(cast "value" :custom_schema.custom_type)

This can be fixed by checking the value using the :form or :val from the cast expression in the compiler but I wondered if there was a higher level fix that would work better. When the expression is parsed it's interpreted as a function call and the last argument as a table/column name, so perhaps there's an abstraction missing, albeit for quite a small edge-case.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/r0man/sqlingvo/issues/104, or mute the thread https://github.com/notifications/unsubscribe-auth/AABUPkviQeOSAKaKPJmLm1y5LRSDjgpEks5thrVOgaJpZM4S55uA .

r0man commented 6 years ago

@deepxg This should be fixed in 0.9.21.