porsager / porsager/postgres

Separate types and docstrings for query helpers

Open
#481 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Typescript
Dominant language
JavaScript
Stars
8.7k
Forks
374
Avg merge
11d 16h
Merged PRs (30d)
1

Description

Currently the sql query helpers have a very generic docstring and a very complex and confusing type signature:
image
This makes using the helpers fairly confusing and error prone (at least for me). In particular, it makes it hard to know what a helper does when reading existing code.

Is there a possibilty to split the different query helpers into different function overloads so that they can each have their own type and docstring?

Or maybe it would be possible to do something like what slonik does and have the helpers be separate functions under sql (https://github.com/gajus/slonik#user-content-slonik-query-building).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies the sql query helpers as the entry point; start by locating their current type signature and docstring definitions. Clarify whether the intended result is separate overloads or separate functions under sql, then define how the chosen API and its documentation should differ before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, postgresql
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.