openpatch / openpatch/bitflow

[Task] SQL in Browser

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

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
44
Forks
4
Avg merge
7m
Merged PRs (30d)
2

Description

We can use sql.js to evaluate SQL in browser and on the server. This should help with providing both client and server evaluation of a task.

The task needs a few settings:

  • instruction: string
  • defaultQuery: string

For evaluation, it should check whether the resulting datasets are equal. We can use EXCEPT to check that.

  • db: URL to a sqlite3 database
  • query: Solution query to compare against

For feedback, there should be a few checks:

  • Report mismatched row count: If EXCEPT returns rows
  • Report mismatched column count: If EXCEPT errors with "SELECTs to the left and right of EXCEPT do not have the same number of result columns"
  • Report mismatched/unordered columns: If EXCEPT returns all rows
  • Show query result as table

For the UI, we only need a code input with highlighting for the SQL query.

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

Start by locating the task configuration, SQL evaluation entry points, and the existing UI pattern for code input and result display. The work is done when browser and server evaluation use the listed settings, compare datasets with EXCEPT, report the specified mismatches, show results as a table, and provide SQL highlighting.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, sqlite, typescript
Domain
databases, full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.