typelevel / typelevel/skunk

[Request] Add a `check` utility for test purposes

Open
#271 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
175
Avg merge
5d 14h
Merged PRs (30d)
9

Description

Basically similar to doobie's approach. Take a Query as an input, validate against a server connection that the query as written matches the types.

It shouldn't require inserting any rows, only that the tables involved exist.

Full-fledged integration tests for certain queries are often hard to write. They might involve many foreign key relations, and thus a lot of distracting and fiddly test setup, or they might be highly-parameterized queries (in terms of the sql structure - imagine a "list from table, maybe sort on a user-selected property, sometimes filter some other property by a user input, etc").

Contributor guide

Open the contributing guide

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

Start by reviewing the existing Query and server-connection APIs to determine how a query can be checked against PostgreSQL without executing inserts. Define the utility's supported validation behavior and confirm that completion means detecting type mismatches while requiring only that referenced tables exist; the issue names no files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgres, scala
Domain
databases, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.