Interpolated named parameters for function calls
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.7k
- Forks
- 374
- Avg merge
- 11d 16h
- Merged PRs (30d)
- 1
Description
Postgres supports calling functions using a "named parameter" notation since (it looks like) version 13: 4.3. Calling Functions.
This is a feature request to support named parameters in interpolations when an object is passed as an argument, similarly to inserts and updates.
E.g.,
const params = { name: 'John', age: 34 }
sql`SELECT my_func(${sql(params)});`
would correspond to
SELECT my_func(name => 'John', age => 34);
Contributor guide
No contributing guide indexed for this repository
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 tracing how object interpolations are handled for inserts and updates, then compare that path with function-call interpolations. Use the PostgreSQL named-parameter syntax in the issue as the target, and verify that the example produces the corresponding name => value arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, postgresql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100