Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending the sql interpolator? #978

Open
luksow opened this issue Sep 14, 2023 · 0 comments
Open

Extending the sql interpolator? #978

luksow opened this issue Sep 14, 2023 · 0 comments

Comments

@luksow
Copy link

luksow commented Sep 14, 2023

Hi,

I'm writing a small wrapper for skunk. I've created a type that encapsulates a column name and it's codec. I want to put an instance of that type into sql"..." and want it to be interpreted as a fragment with that column name. As far as I understand, it won't work as macro implementation of sql operates on a closed set of classes and hence, supplying implicit conversion won't help.

Are there any ways to achieve that without writing own interpolator? Maybe it'd be possible to extend the macro to either accept implicit conversions or maybe a type that has a method like toSqlFragment that would be open to extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant