omnata-plugin-runtime 0.9.4a217__tar.gz → 0.9.5a219__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/PKG-INFO +1 -1
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/pyproject.toml +1 -1
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/json_schema.py +18 -10
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/LICENSE +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/README.md +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/__init__.py +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/api.py +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/configuration.py +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/forms.py +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/logging.py +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/omnata_plugin.py +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/plugin_entrypoints.py +0 -0
- {omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/rate_limiting.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "omnata-plugin-runtime"
|
3
|
-
version = "0.9.
|
3
|
+
version = "0.9.5-a219"
|
4
4
|
description = "Classes and common runtime components for building and running Omnata Plugins"
|
5
5
|
authors = ["James Weakley <james.weakley@omnata.com>"]
|
6
6
|
readme = "README.md"
|
@@ -166,16 +166,18 @@ class SnowflakeViewColumn(BaseModel):
|
|
166
166
|
def definition(self) -> str:
|
167
167
|
return f'{self.expression} as "{self.name}"'
|
168
168
|
|
169
|
-
def name_with_comment(self) -> str:
|
169
|
+
def name_with_comment(self,binding_list:Optional[List[Any]] = None) -> str:
|
170
170
|
"""
|
171
171
|
Returns the column name (quoted), along with any comment.
|
172
172
|
The resulting text can be used in a CREATE VIEW statement.
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
173
|
+
If binding_list is provided, the comment will be added to the list, and a placeholder '?' will be used in the SQL.
|
174
|
+
"""
|
175
|
+
if self.comment is None:
|
176
|
+
return f'"{self.name}"'
|
177
|
+
if binding_list is not None:
|
178
|
+
binding_list.append(self.comment)
|
179
|
+
return f'"{self.name}" COMMENT ?'
|
180
|
+
return f'"{self.name}" COMMENT $${self.comment}$$'
|
179
181
|
|
180
182
|
@classmethod
|
181
183
|
def from_json_schema_property(cls,
|
@@ -357,11 +359,17 @@ class SnowflakeViewPart(BaseModel):
|
|
357
359
|
"""
|
358
360
|
return f"COMMENT = $${self.comment}$$ " if self.comment is not None else ""
|
359
361
|
|
360
|
-
def column_names_with_comments(self) -> List[str]:
|
362
|
+
def column_names_with_comments(self,binding_list:Optional[List[Any]] = None) -> List[str]:
|
363
|
+
"""
|
364
|
+
Returns a list of column names with comments, suitable for use in a CREATE VIEW statement.
|
365
|
+
This includes direct columns first, followed by join columns.
|
366
|
+
If binding_list is provided, the comments will be added to the list, and a placeholder '?' will be used in the SQL.
|
367
|
+
Otherwise, the comments will be included in the SQL inside of a '$$' delimiter.
|
368
|
+
"""
|
361
369
|
# the outer view definition has all of the column names and comments, but with the direct columns
|
362
370
|
# first and the join columns last, same as they are ordered in the inner query
|
363
371
|
return [
|
364
|
-
c.name_with_comment() for c in (self.direct_columns() + self.join_columns())
|
372
|
+
c.name_with_comment(binding_list) for c in (self.direct_columns() + self.join_columns())
|
365
373
|
]
|
366
374
|
|
367
375
|
def cte_text(self) -> str:
|
@@ -594,7 +602,7 @@ def normalized_view_part(
|
|
594
602
|
column_name_expression=column_name_expression
|
595
603
|
)
|
596
604
|
if json_schema.joins:
|
597
|
-
joins = json_schema
|
605
|
+
joins = json_schema.joins
|
598
606
|
comment = json_schema.description
|
599
607
|
|
600
608
|
return SnowflakeViewPart(
|
File without changes
|
File without changes
|
File without changes
|
{omnata_plugin_runtime-0.9.4a217 → omnata_plugin_runtime-0.9.5a219}/src/omnata_plugin_runtime/api.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|