typelevel / typelevel/doobie

sql-only checks for insert/update/delete in crippled mysql

Open
#313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation User Question
Dominant language
Scala
Stars
2.2k
Forks
379
Avg merge
14m
Merged PRs (30d)
8

Description

Hi @tpolecat,

We talked about this a couple weeks ago in the channel, and I thought I'd rigged my own solution using something like this:

def checkOutput(u: Update0) =
   checkAnalysis(s"Update0", u.stackFrame, u.sql, HC.prepareUpdateAnalysis0(u.sql))

but I discovered today that errors like unknown column names or even sql syntax errors aren't caught by that. Can you recommend a more effective implementation? :)

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 tracing checkOutput for Update0 and HC.prepareUpdateAnalysis0(u.sql), then reproduce the unknown-column and SQL syntax errors in the crippled MySQL setup. The issue is done when the SQL-only checks reliably catch the relevant errors for insert, update, and delete operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, scala
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.