-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2669a49
commit f10b2a4
Showing
7 changed files
with
112 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- https://cratedb.com/docs/sql-99/en/latest/chapters/01.html | ||
-- https://www.postgresql.org/docs/16/sql-createtable.html | ||
-- https://www.postgresql.org/docs/16/sql-select.html | ||
CREATE TABLE city (); | ||
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"table_name": ["city"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
import json | ||
|
||
|
||
def run_sql(input_sql: list[str]) -> list[str]: | ||
output = {"table_name": ["city"]} | ||
return [json.dumps(output)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import helpers | ||
|
||
|
||
# pylint: disable=wrong-import-order | ||
|
||
|
||
######################## | ||
# business logic start # | ||
######################## | ||
|
||
|
||
import json | ||
|
||
|
||
def run_sql(input_sql: list[str]) -> list[str]: | ||
output = {"table_name": ["city"]} | ||
return [json.dumps(output)] | ||
|
||
|
||
###################### | ||
# business logic end # | ||
###################### | ||
|
||
if __name__ == "__main__": | ||
helpers.run(run_sql) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters