bitemyapp / bitemyapp/esqueleto

postgresql `pair` function

Open
#400 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
399
Forks
107
Avg merge
1d 17h
Merged PRs (30d)
1

Description

Sometimes in postgresql you need to pass a pair of value to a function.

The example I have in mind is something like `array_agg ((foo.bar, foo.baz))` (the double parenthesis is required).

It would be nice to have a `pair` function with signature `SqlExpr (Value a) -> SqlExpr (Value b) -> SqlExpr (Value (a, b))` to construct such values

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Start by locating existing SqlExpr helper functions and the PostgreSQL expression rendering or tuple-handling entry points, then compare their patterns with the requested pair signature and array_agg example. Done means the helper constructs the requested PostgreSQL pair value and has coverage for the shown use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, postgresql
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.