Skip to content

Extending the sql interpolator?  #978

@luksow

Description

@luksow

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions