Skip to content

Commit 7f05a18

Browse files
Switch the sql output to be a file
1 parent 8dcca66 commit 7f05a18

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

prompts/pylint/3-4-json-violations->sql-violations.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ tools:
1212
image: vonwig/javascript-runner
1313
command:
1414
- "{{javascript|safe}}"
15+
- name: sqlite
16+
description: run the sqlite command
17+
parameters:
18+
type: object
19+
properties:
20+
database:
21+
type: string
22+
description: the path to the database
23+
sql:
24+
type: string
25+
description: the sql statement to run
26+
container:
27+
image: vonwig/sqlite:latest
28+
command:
29+
- "{{database}}"
30+
- "{{sql|safe}}"
1531
---
1632

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

2945
For each element of the array, it should create two INSERT statements.
30-
The first should insert the columns message, path, and type into a table named VIOLATIONS using the properties from the map.
46+
The first should insert the columns MESSAGE, and TYPE into a table named VIOLATIONS using the properties from the map.
3147
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.
3248

33-
The statement should be printed to the console.
49+
The statements should be written to the file /thread/insert.sql
3450

3551
Now execute the javascript code.
3652

0 commit comments

Comments
 (0)