Skip to content

Commit 2037beb

Browse files
break violations into two INSERT statements
* keep the mapping vague but let it map between json names and SQL names
1 parent 51ccb31 commit 2037beb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ It should then iterate over each element of an array with the following schema:
2121

2222
```json
2323
[
24-
{"message": "some violation", "path": "app.py", "type": "error"}
24+
{"message": "some violation", "path": "app.py", "type": "error",
25+
"line": 0, "column": 0, "endLine": 1, "endColumn": 1, "path": "src/app.py"}
2526
]
2627
```
2728

28-
For each element of the array, it should create an INSERT statement for a table named PEOPLE with the properties from the map.
29+
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.
31+
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.
2932

3033
The statement should be printed to the console.
3134

0 commit comments

Comments
 (0)