quillsql 2.2.1__py3-none-any.whl → 2.2.2__py3-none-any.whl
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/core.py +27 -30
- {quillsql-2.2.1.dist-info → quillsql-2.2.2.dist-info}/METADATA +1 -1
- {quillsql-2.2.1.dist-info → quillsql-2.2.2.dist-info}/RECORD +5 -5
- {quillsql-2.2.1.dist-info → quillsql-2.2.2.dist-info}/WHEEL +0 -0
- {quillsql-2.2.1.dist-info → quillsql-2.2.2.dist-info}/top_level.txt +0 -0
quillsql/core.py
CHANGED
|
@@ -113,8 +113,9 @@ class Quill:
|
|
|
113
113
|
**metadata,
|
|
114
114
|
"tenants": tenants,
|
|
115
115
|
"flags": flags,
|
|
116
|
-
"adminEnabled": admin_enabled,
|
|
117
116
|
}
|
|
117
|
+
if admin_enabled is not None:
|
|
118
|
+
pivot_payload["adminEnabled"] = admin_enabled
|
|
118
119
|
if filters is not None:
|
|
119
120
|
pivot_payload["sdkFilters"] = [
|
|
120
121
|
convert_custom_filter(f) for f in filters
|
|
@@ -212,17 +213,16 @@ class Quill:
|
|
|
212
213
|
tenants[0] != SINGLE_TENANT
|
|
213
214
|
):
|
|
214
215
|
|
|
215
|
-
|
|
216
|
-
'
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
)
|
|
216
|
+
tenant_flags_payload = {
|
|
217
|
+
'reportId': metadata.get('reportId') or metadata.get('dashboardItemId'),
|
|
218
|
+
'clientId': metadata.get('clientId'),
|
|
219
|
+
'dashboardName': metadata.get('name'),
|
|
220
|
+
'tenants': tenants,
|
|
221
|
+
'flags': flags,
|
|
222
|
+
}
|
|
223
|
+
if admin_enabled is not None:
|
|
224
|
+
tenant_flags_payload['adminEnabled'] = admin_enabled
|
|
225
|
+
response = self.post_quill('tenant-mapped-flags', tenant_flags_payload)
|
|
226
226
|
|
|
227
227
|
if response.get('error'):
|
|
228
228
|
return {
|
|
@@ -277,14 +277,15 @@ class Quill:
|
|
|
277
277
|
and metadata.get("runQueryConfig").get("getColumns")
|
|
278
278
|
else None
|
|
279
279
|
)
|
|
280
|
-
payload = {
|
|
280
|
+
payload: dict = {
|
|
281
281
|
**metadata,
|
|
282
282
|
"tenants": tenants,
|
|
283
283
|
"flags": tenant_flags,
|
|
284
284
|
"viewQuery": view_query,
|
|
285
285
|
"preQueryResultsColumns": pre_query_columns,
|
|
286
|
-
"adminEnabled": admin_enabled,
|
|
287
286
|
}
|
|
287
|
+
if admin_enabled is not None:
|
|
288
|
+
payload["adminEnabled"] = admin_enabled
|
|
288
289
|
if filters is not None:
|
|
289
290
|
payload["sdkFilters"] = [convert_custom_filter(f) for f in filters]
|
|
290
291
|
quill_results = self.post_quill(metadata.get("task"), payload)
|
|
@@ -331,14 +332,11 @@ class Quill:
|
|
|
331
332
|
|
|
332
333
|
if (
|
|
333
334
|
normalized_results.get("mapped_array")
|
|
334
|
-
and
|
|
335
|
+
and responseMetadata.get("runQueryConfig", {}).get("arrayToMap")
|
|
335
336
|
):
|
|
336
|
-
array_to_map =
|
|
337
|
-
for
|
|
338
|
-
|
|
339
|
-
range(len(normalized_results["mapped_array"])),
|
|
340
|
-
):
|
|
341
|
-
responseMetadata[array_to_map["arrayName"]][index][array_to_map["field"]] = array
|
|
337
|
+
array_to_map = responseMetadata["runQueryConfig"]["arrayToMap"]
|
|
338
|
+
for index, mapped_rows in enumerate(normalized_results["mapped_array"]):
|
|
339
|
+
responseMetadata[array_to_map["arrayName"]][index][array_to_map["field"]] = mapped_rows
|
|
342
340
|
del normalized_results["mapped_array"]
|
|
343
341
|
|
|
344
342
|
query_results_list = normalized_results.get("queryResults") or []
|
|
@@ -354,15 +352,14 @@ class Quill:
|
|
|
354
352
|
|
|
355
353
|
except Exception as err:
|
|
356
354
|
if task == "update-view":
|
|
357
|
-
|
|
358
|
-
"
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
)
|
|
355
|
+
broken_view_payload = {
|
|
356
|
+
"table": metadata.get("name"),
|
|
357
|
+
"clientId": metadata.get("clientId"),
|
|
358
|
+
"error": str(err),
|
|
359
|
+
}
|
|
360
|
+
if admin_enabled is not None:
|
|
361
|
+
broken_view_payload["adminEnabled"] = admin_enabled
|
|
362
|
+
self.post_quill("set-broken-view", broken_view_payload)
|
|
366
363
|
return {
|
|
367
364
|
"error": str(err).splitlines()[0],
|
|
368
365
|
"status": "error",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
quillsql/__init__.py,sha256=FiuoxaNZveKXOPB0hkpfGNlpZKmSn3pRwcqm9HKYbCQ,180
|
|
2
|
-
quillsql/core.py,sha256=
|
|
2
|
+
quillsql/core.py,sha256=TaQ-1dKyHfR8xxDup_CogPp66MvnKwFWJV00sg61jVY,22596
|
|
3
3
|
quillsql/error.py,sha256=n9VKHw4FAgg7ZEAz2YQ8L_8FdRG_1shwGngf2iWhUSM,175
|
|
4
4
|
quillsql/assets/__init__.py,sha256=oXQ2ZS5XDXkXTYjADxNfGt55cIn_rqfgWL2EDqjTyoI,45
|
|
5
5
|
quillsql/assets/pgtypes.py,sha256=-B_2wUaoAsdX7_HnJhUlx4ptZQ6x-cXwuST9ACgGFdE,33820
|
|
@@ -14,7 +14,7 @@ quillsql/utils/pivot_template.py,sha256=NzHO7Ux8GVAKY-DUtsOmE7TUls2q6FJG2kgJxVWq
|
|
|
14
14
|
quillsql/utils/run_query_processes.py,sha256=FRmNvjTDLUBr7MqDKQmivdC0anwybMXUyzQbKnaZx70,698
|
|
15
15
|
quillsql/utils/schema_conversion.py,sha256=TFfMibN9nOsxNRhHw5YIFl3jGTvipG81bxX4LFDulUY,314
|
|
16
16
|
quillsql/utils/tenants.py,sha256=ZD2FuKz0gjBVSsThHDv1P8PU6EL8E009NWihE5hAH-Q,2022
|
|
17
|
-
quillsql-2.2.
|
|
18
|
-
quillsql-2.2.
|
|
19
|
-
quillsql-2.2.
|
|
20
|
-
quillsql-2.2.
|
|
17
|
+
quillsql-2.2.2.dist-info/METADATA,sha256=-6MvxXsVJQFJRkorVZXkggWzoyguME6bfnoHjYUbzD4,1786
|
|
18
|
+
quillsql-2.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
quillsql-2.2.2.dist-info/top_level.txt,sha256=eU2vHnVqwpYQJ3ADl1Q-DIBzbYejZRUhcMdN_4zMCz8,9
|
|
20
|
+
quillsql-2.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|