Skip to content

Commit

Permalink
Switch the sql output to be a file
Browse files Browse the repository at this point in the history
  • Loading branch information
slimslenderslacks committed Sep 10, 2024
1 parent 8dcca66 commit 7f05a18
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions prompts/pylint/3-4-json-violations->sql-violations.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ tools:
image: vonwig/javascript-runner
command:
- "{{javascript|safe}}"
- name: sqlite
description: run the sqlite command
parameters:
type: object
properties:
database:
type: string
description: the path to the database
sql:
type: string
description: the sql statement to run
container:
image: vonwig/sqlite:latest
command:
- "{{database}}"
- "{{sql|safe}}"
---

# prompt user
Expand All @@ -27,10 +43,10 @@ It should then iterate over each element of an array with the following schema:
```

For each element of the array, it should create two INSERT statements.
The first should insert the columns message, path, and type into a table named VIOLATIONS using the properties from the map.
The first should insert the columns MESSAGE, and TYPE into a table named VIOLATIONS using the properties from the map.
The second should insert the the columns PATH, START_LINE, END_LINE, START_COLUMN, END_COLUMN into a tabled named RANGE using the properties from the map.

The statement should be printed to the console.
The statements should be written to the file /thread/insert.sql

Now execute the javascript code.

0 comments on commit 7f05a18

Please sign in to comment.