Skip to content

[Task] SQL in Browser #597

Description

@mikebarkmin

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions