quillsql 2.1.4__tar.gz → 2.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quillsql-2.1.4 → quillsql-2.1.5}/PKG-INFO +1 -1
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/core.py +3 -5
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/utils/run_query_processes.py +6 -7
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql.egg-info/PKG-INFO +1 -1
- {quillsql-2.1.4 → quillsql-2.1.5}/setup.py +1 -1
- {quillsql-2.1.4 → quillsql-2.1.5}/README.md +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/__init__.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/assets/__init__.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/assets/pgtypes.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/db/__init__.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/db/bigquery.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/db/cached_connection.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/db/db_helper.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/db/postgres.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/error.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/utils/__init__.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql/utils/schema_conversion.py +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql.egg-info/SOURCES.txt +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql.egg-info/dependency_links.txt +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql.egg-info/requires.txt +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/quillsql.egg-info/top_level.txt +0 -0
- {quillsql-2.1.4 → quillsql-2.1.5}/setup.cfg +0 -0
|
@@ -112,7 +112,7 @@ class Quill:
|
|
|
112
112
|
if not queries:
|
|
113
113
|
return {"queryResults": []}
|
|
114
114
|
if databaseType and databaseType.lower() != pkDatabaseType.lower():
|
|
115
|
-
return {"dbMismatched": True, "
|
|
115
|
+
return {"dbMismatched": True, "backendDatabaseType": pkDatabaseType}
|
|
116
116
|
if runQueryConfig and runQueryConfig.get("arrayToMap"):
|
|
117
117
|
array_to_map(
|
|
118
118
|
queries, runQueryConfig.get("arrayToMap"), metadata, self.target_connection
|
|
@@ -141,10 +141,8 @@ class Quill:
|
|
|
141
141
|
queries = [query.strip().rstrip(";") + " limit " + runQueryConfig.get("limitBy") for query in queries]
|
|
142
142
|
query_results = [self.target_connection.query(query) for query in queries]
|
|
143
143
|
results["queryResults"] = query_results
|
|
144
|
-
if runQueryConfig and runQueryConfig.get("
|
|
145
|
-
results["queryResults"] = remove_fields(
|
|
146
|
-
query_results, runQueryConfig.get("removeFields")
|
|
147
|
-
)
|
|
144
|
+
if runQueryConfig and runQueryConfig.get("fieldsToRemove"):
|
|
145
|
+
results["queryResults"] = [ remove_fields(query_result, runQueryConfig.get("fieldsToRemove")) for query_result in results["queryResults"]]
|
|
148
146
|
if runQueryConfig and runQueryConfig.get("convertDatatypes"):
|
|
149
147
|
for query_result in results["queryResults"]:
|
|
150
148
|
query_result["fields"] = [
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import json
|
|
2
2
|
|
|
3
|
-
def remove_fields(query_result,
|
|
3
|
+
def remove_fields(query_result, fields_to_remove):
|
|
4
4
|
fields = [
|
|
5
|
-
{"name":
|
|
6
|
-
for
|
|
7
|
-
if
|
|
5
|
+
{"name": field['name'], "dataTypeID": field['dataTypeID']}
|
|
6
|
+
for field in query_result['fields']
|
|
7
|
+
if field['name'] not in fields_to_remove
|
|
8
8
|
]
|
|
9
|
-
rows = [
|
|
10
|
-
|
|
9
|
+
rows = [row for row in query_result['rows']]
|
|
11
10
|
for row in rows:
|
|
12
11
|
for field in fields_to_remove:
|
|
13
12
|
if field in row:
|
|
14
13
|
del row[field]
|
|
15
|
-
return {fields, rows}
|
|
14
|
+
return {"fields": fields, "rows": rows}
|
|
16
15
|
|
|
17
16
|
def array_to_map(queries, array_to_map, metadata, target_pool):
|
|
18
17
|
for i in range(len(queries)):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|