Extending the sql interpolator?
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 175
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 9
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Skunk's SQL interpolator macro implementation, which the issue identifies as accepting only a closed set of classes. Determine whether an extension mechanism is intended; the issue does not name files or tests, and completion criteria remain undecided between implicit conversions and a toSqlFragment-style API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgres, scala, sql
- Domain
- backend-api-design, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100