pylegend 0.7.0__tar.gz → 0.8.0__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.
- {pylegend-0.7.0 → pylegend-0.8.0}/PKG-INFO +1 -1
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/literal_expressions.py +2 -2
- pylegend-0.8.0/pylegend/core/language/shared/pct_helpers.py +56 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pyproject.toml +2 -1
- {pylegend-0.7.0 → pylegend-0.8.0}/LICENSE +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/LICENSE.spdx +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/NOTICE +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/README.md +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/_typing.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/database/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/database/sql_to_string/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/database/sql_to_string/config.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/database/sql_to_string/db_extension.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/database/sql_to_string/generator.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legacy_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legacy_api/aggregate_specification.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legacy_api/legacy_api_tds_row.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legendql_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legendql_api/legendql_api_custom_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legendql_api/legendql_api_tds_row.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/column_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/expression.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/functions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/helpers.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/binary_expression.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/boolean_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/collection_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/date_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/float_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/integer_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/nullary_expression.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/number_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/primitive_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/string_operation_expressions.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/unary_expression.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitive_collection.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/boolean.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/date.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/datetime.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/float.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/integer.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/number.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/primitive.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/strictdate.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/primitives/string.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/tds_row.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/project_cooridnates.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/request/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/request/auth.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/request/legend_client.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/request/response_reader.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/request/service_client.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/sql/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/sql/metamodel.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/sql/metamodel_extension.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/abstract/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/abstract/frames/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/abstract/frames/applied_function_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/abstract/frames/base_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/abstract/frames/input_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/abstract/function_helpers.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_concatenate_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_distinct_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_drop_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_extend_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_filter_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_group_by_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_head_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_join_by_columns_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_join_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_rename_columns_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_restrict_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_slice_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/functions/legacy_api_sort_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/legacy_api_applied_function_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/legacy_api_base_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/legacy_api_input_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/legacy_api_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_asofjoin_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_concatenate_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_distinct_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_drop_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_extend_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_filter_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_function_helpers.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_groupby_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_head_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_join_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_project_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_rename_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_select_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_slice_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_sort_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/legendql_api_window_extend_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/legendql_api_applied_function_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/legendql_api_base_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/legendql_api_input_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/legendql_api_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/functions/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/functions/assign_function.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/pandas_api_applied_function_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/pandas_api_base_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/pandas_api_input_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/pandas_api_tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/result_handler.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/to_csv_file_result_handler.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/to_json_file_result_handler.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/to_string_result_handler.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/sql_query_helpers.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/tds_column.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/tds_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/database/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/database/vendors/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/database/vendors/postgres/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/database/vendors/postgres/postgres_sql_to_string.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/abstract/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/abstract/legend_function_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/abstract/legend_service_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/abstract/table_spec_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legacy_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legacy_api/frames/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legacy_api/frames/legacy_api_legend_function_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legacy_api/frames/legacy_api_legend_service_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legacy_api/frames/legacy_api_table_spec_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legendql_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legendql_api/frames/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legendql_api/frames/legendql_api_legend_function_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legendql_api/frames/legendql_api_legend_service_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/legendql_api/frames/legendql_api_table_spec_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/pandas_api/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/pandas_api/frames/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/pandas_api/frames/pandas_api_legend_function_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/pandas_api/frames/pandas_api_legend_service_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/pandas_api/frames/pandas_api_table_spec_input_frame.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/result_handler/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/result_handler/to_pandas_df_result_handler.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/legacy_api_tds_client.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/legendql_api_tds_client.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/utils/__init__.py +0 -0
- {pylegend-0.7.0 → pylegend-0.8.0}/pylegend/utils/class_utils.py +0 -0
|
@@ -108,7 +108,7 @@ class PyLegendIntegerLiteralExpression(PyLegendExpressionIntegerReturn):
|
|
|
108
108
|
return IntegerLiteral(value=self.__value)
|
|
109
109
|
|
|
110
110
|
def to_pure_expression(self, config: FrameToPureConfig) -> str:
|
|
111
|
-
return str(self.__value)
|
|
111
|
+
return f"minus({abs(self.__value)})" if self.__value < 0 else str(self.__value)
|
|
112
112
|
|
|
113
113
|
def is_non_nullable(self) -> bool:
|
|
114
114
|
return True
|
|
@@ -128,7 +128,7 @@ class PyLegendFloatLiteralExpression(PyLegendExpressionFloatReturn):
|
|
|
128
128
|
return DoubleLiteral(value=self.__value)
|
|
129
129
|
|
|
130
130
|
def to_pure_expression(self, config: FrameToPureConfig) -> str:
|
|
131
|
-
return str(self.__value)
|
|
131
|
+
return f"minus({abs(self.__value)})" if self.__value < 0 else str(self.__value)
|
|
132
132
|
|
|
133
133
|
def is_non_nullable(self) -> bool:
|
|
134
134
|
return True
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Copyright 2025 Goldman Sachs
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from datetime import datetime, date
|
|
16
|
+
from pylegend._typing import (
|
|
17
|
+
PyLegendSequence,
|
|
18
|
+
PyLegendUnion,
|
|
19
|
+
)
|
|
20
|
+
from pylegend.core.language import (
|
|
21
|
+
convert_literal_to_literal_expression,
|
|
22
|
+
PyLegendBooleanLiteralExpression,
|
|
23
|
+
PyLegendStringLiteralExpression,
|
|
24
|
+
PyLegendIntegerLiteralExpression,
|
|
25
|
+
PyLegendFloatLiteralExpression,
|
|
26
|
+
PyLegendStrictDateLiteralExpression,
|
|
27
|
+
PyLegendDateTimeLiteralExpression,
|
|
28
|
+
PyLegendFloat,
|
|
29
|
+
PyLegendDateTime,
|
|
30
|
+
PyLegendStrictDate,
|
|
31
|
+
PyLegendString,
|
|
32
|
+
PyLegendInteger,
|
|
33
|
+
PyLegendBoolean,
|
|
34
|
+
PyLegendPrimitive
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
__all__: PyLegendSequence[str] = [
|
|
38
|
+
"c",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def c(constant: PyLegendUnion[int, float, bool, str, datetime, date]) -> PyLegendPrimitive:
|
|
43
|
+
expr = convert_literal_to_literal_expression(constant)
|
|
44
|
+
if isinstance(expr, PyLegendBooleanLiteralExpression):
|
|
45
|
+
return PyLegendBoolean(expr)
|
|
46
|
+
if isinstance(expr, PyLegendStringLiteralExpression):
|
|
47
|
+
return PyLegendString(expr)
|
|
48
|
+
if isinstance(expr, PyLegendIntegerLiteralExpression):
|
|
49
|
+
return PyLegendInteger(expr)
|
|
50
|
+
if isinstance(expr, PyLegendFloatLiteralExpression):
|
|
51
|
+
return PyLegendFloat(expr)
|
|
52
|
+
if isinstance(expr, PyLegendDateTimeLiteralExpression):
|
|
53
|
+
return PyLegendDateTime(expr)
|
|
54
|
+
if isinstance(expr, PyLegendStrictDateLiteralExpression):
|
|
55
|
+
return PyLegendStrictDate(expr)
|
|
56
|
+
raise RuntimeError(f"Unsupported constant type: {type(constant)}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pylegend"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.0"
|
|
4
4
|
description = "Python language binding for Legend data management platform"
|
|
5
5
|
authors = ["PyLegend Maintainers <legend@finos.org>"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -36,6 +36,7 @@ sqlalchemy = ">=2.0.0"
|
|
|
36
36
|
pg8000 = ">=1.0.0"
|
|
37
37
|
pymysql = ">=1.0.0"
|
|
38
38
|
cryptography = ">=40.0.0"
|
|
39
|
+
wrapt = "<2.0.0"
|
|
39
40
|
|
|
40
41
|
[build-system]
|
|
41
42
|
requires = ["poetry-core"]
|
|
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
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legacy_api/aggregate_specification.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/legendql_api/legendql_api_tds_row.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/binary_expression.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/nullary_expression.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/language/shared/operations/unary_expression.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/abstract/frames/applied_function_tds_frame.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/legacy_api_base_tds_frame.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/legacy_api_input_tds_frame.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legacy_api/frames/legacy_api_tds_frame.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/functions/__init__.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/legendql_api/frames/legendql_api_tds_frame.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/functions/assign_function.py
RENAMED
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/pandas_api_base_tds_frame.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/pandas_api_input_tds_frame.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/pandas_api/frames/pandas_api_tds_frame.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/to_csv_file_result_handler.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/to_json_file_result_handler.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/core/tds/result_handler/to_string_result_handler.py
RENAMED
|
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
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/abstract/legend_function_input_frame.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/abstract/legend_service_input_frame.py
RENAMED
|
File without changes
|
{pylegend-0.7.0 → pylegend-0.8.0}/pylegend/extensions/tds/abstract/table_spec_input_frame.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|