pytrilogy 0.0.3.55__py3-none-any.whl → 0.0.3.57__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.
Potentially problematic release.
This version of pytrilogy might be problematic. Click here for more details.
- {pytrilogy-0.0.3.55.dist-info → pytrilogy-0.0.3.57.dist-info}/METADATA +1 -1
- {pytrilogy-0.0.3.55.dist-info → pytrilogy-0.0.3.57.dist-info}/RECORD +39 -34
- {pytrilogy-0.0.3.55.dist-info → pytrilogy-0.0.3.57.dist-info}/WHEEL +1 -1
- trilogy/__init__.py +1 -1
- trilogy/authoring/__init__.py +12 -1
- trilogy/core/enums.py +1 -0
- trilogy/core/models/author.py +6 -4
- trilogy/core/models/execute.py +4 -1
- trilogy/core/optimization.py +4 -4
- trilogy/core/processing/concept_strategies_v3.py +324 -895
- trilogy/core/processing/discovery_loop.py +0 -0
- trilogy/core/processing/discovery_node_factory.py +475 -0
- trilogy/core/processing/discovery_utility.py +123 -0
- trilogy/core/processing/discovery_validation.py +155 -0
- trilogy/core/processing/node_generators/basic_node.py +29 -11
- trilogy/core/processing/node_generators/node_merge_node.py +1 -1
- trilogy/core/processing/node_generators/select_node.py +6 -8
- trilogy/core/processing/node_generators/synonym_node.py +2 -1
- trilogy/core/processing/node_generators/unnest_node.py +7 -1
- trilogy/core/processing/nodes/__init__.py +2 -4
- trilogy/core/processing/nodes/base_node.py +0 -13
- trilogy/core/processing/nodes/group_node.py +1 -1
- trilogy/core/processing/utility.py +38 -11
- trilogy/core/query_processor.py +3 -3
- trilogy/core/statements/author.py +6 -2
- trilogy/core/statements/execute.py +3 -2
- trilogy/dialect/base.py +3 -30
- trilogy/dialect/snowflake.py +1 -1
- trilogy/executor.py +13 -4
- trilogy/parsing/common.py +1 -3
- trilogy/parsing/parse_engine.py +14 -2
- trilogy/parsing/trilogy.lark +1 -1
- trilogy/std/date.preql +3 -1
- trilogy/std/geography.preql +4 -0
- trilogy/std/money.preql +65 -4
- trilogy/std/net.preql +8 -0
- {pytrilogy-0.0.3.55.dist-info → pytrilogy-0.0.3.57.dist-info}/entry_points.txt +0 -0
- {pytrilogy-0.0.3.55.dist-info → pytrilogy-0.0.3.57.dist-info}/licenses/LICENSE.md +0 -0
- {pytrilogy-0.0.3.55.dist-info → pytrilogy-0.0.3.57.dist-info}/top_level.txt +0 -0
trilogy/parsing/parse_engine.py
CHANGED
|
@@ -74,6 +74,7 @@ from trilogy.core.models.author import (
|
|
|
74
74
|
Parenthetical,
|
|
75
75
|
RowsetItem,
|
|
76
76
|
SubselectComparison,
|
|
77
|
+
UndefinedConceptFull,
|
|
77
78
|
WhereClause,
|
|
78
79
|
Window,
|
|
79
80
|
WindowItem,
|
|
@@ -666,8 +667,14 @@ class ParseToObjects(Transformer):
|
|
|
666
667
|
environment=self.environment,
|
|
667
668
|
metadata=metadata,
|
|
668
669
|
)
|
|
669
|
-
|
|
670
|
-
|
|
670
|
+
# let constant purposes exist to support round-tripping
|
|
671
|
+
# as a build concept may end up with a constant based on constant inlining happening recursively
|
|
672
|
+
if (
|
|
673
|
+
purpose
|
|
674
|
+
and purpose != Purpose.AUTO
|
|
675
|
+
and concept.purpose != purpose
|
|
676
|
+
and purpose != Purpose.CONSTANT
|
|
677
|
+
):
|
|
671
678
|
raise SyntaxError(
|
|
672
679
|
f'Concept {name} purpose {concept.purpose} does not match declared purpose {purpose}. Suggest defaulting to "auto"'
|
|
673
680
|
)
|
|
@@ -962,6 +969,11 @@ class ParseToObjects(Transformer):
|
|
|
962
969
|
targets = {sources[0].address: self.environment.concepts[target]}
|
|
963
970
|
|
|
964
971
|
if self.parse_pass == ParsePass.VALIDATION:
|
|
972
|
+
for source_c in sources:
|
|
973
|
+
if isinstance(source_c, UndefinedConceptFull):
|
|
974
|
+
raise SyntaxError(
|
|
975
|
+
f"Cannot merge non-existent source concept {source_c.address} on line: {meta.line}"
|
|
976
|
+
)
|
|
965
977
|
new = MergeStatementV2(
|
|
966
978
|
sources=sources,
|
|
967
979
|
targets=targets,
|
trilogy/parsing/trilogy.lark
CHANGED
trilogy/std/date.preql
CHANGED
trilogy/std/geography.preql
CHANGED
trilogy/std/money.preql
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
|
+
# generic currency types
|
|
1
2
|
|
|
3
|
+
# Major global currencies
|
|
4
|
+
type usd numeric; # US Dollar
|
|
5
|
+
type eur numeric; # Euro
|
|
6
|
+
type gbp numeric; # British Pound Sterling
|
|
7
|
+
type jpy numeric; # Japanese Yen
|
|
8
|
+
type chf numeric; # Swiss Franc
|
|
9
|
+
type cad numeric; # Canadian Dollar
|
|
10
|
+
type aud numeric; # Australian Dollar
|
|
11
|
+
type nzd numeric; # New Zealand Dollar
|
|
2
12
|
|
|
3
|
-
#
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
type
|
|
13
|
+
# Asian currencies
|
|
14
|
+
type cny numeric; # Chinese Yuan
|
|
15
|
+
type hkd numeric; # Hong Kong Dollar
|
|
16
|
+
type sgd numeric; # Singapore Dollar
|
|
17
|
+
type krw numeric; # South Korean Won
|
|
18
|
+
type inr numeric; # Indian Rupee
|
|
19
|
+
type thb numeric; # Thai Baht
|
|
20
|
+
type php numeric; # Philippine Peso
|
|
21
|
+
type myr numeric; # Malaysian Ringgit
|
|
22
|
+
type idr numeric; # Indonesian Rupiah
|
|
23
|
+
type vnd numeric; # Vietnamese Dong
|
|
24
|
+
|
|
25
|
+
# European currencies (non-Euro)
|
|
26
|
+
type sek numeric; # Swedish Krona
|
|
27
|
+
type nok numeric; # Norwegian Krone
|
|
28
|
+
type dkk numeric; # Danish Krone
|
|
29
|
+
type pln numeric; # Polish Zloty
|
|
30
|
+
type czk numeric; # Czech Koruna
|
|
31
|
+
type huf numeric; # Hungarian Forint
|
|
32
|
+
type ron numeric; # Romanian Leu
|
|
33
|
+
type bgn numeric; # Bulgarian Lev
|
|
34
|
+
type rub numeric; # Russian Ruble
|
|
35
|
+
|
|
36
|
+
# Middle Eastern currencies
|
|
37
|
+
type aed numeric; # UAE Dirham
|
|
38
|
+
type sar numeric; # Saudi Riyal
|
|
39
|
+
type qar numeric; # Qatari Riyal
|
|
40
|
+
type kwd numeric; # Kuwaiti Dinar
|
|
41
|
+
type bhd numeric; # Bahraini Dinar
|
|
42
|
+
type omr numeric; # Omani Rial
|
|
43
|
+
type jod numeric; # Jordanian Dinar
|
|
44
|
+
type ils numeric; # Israeli Shekel
|
|
45
|
+
type try numeric; # Turkish Lira
|
|
46
|
+
|
|
47
|
+
# African currencies
|
|
48
|
+
type zar numeric; # South African Rand
|
|
49
|
+
type egp numeric; # Egyptian Pound
|
|
50
|
+
type ngn numeric; # Nigerian Naira
|
|
51
|
+
type mad numeric; # Moroccan Dirham
|
|
52
|
+
type kes numeric; # Kenyan Shilling
|
|
53
|
+
type ghs numeric; # Ghanaian Cedi
|
|
54
|
+
|
|
55
|
+
# Latin American currencies
|
|
56
|
+
type mxn numeric; # Mexican Peso
|
|
57
|
+
type brl numeric; # Brazilian Real
|
|
58
|
+
type ars numeric; # Argentine Peso
|
|
59
|
+
type cop numeric; # Colombian Peso
|
|
60
|
+
type pen numeric; # Peruvian Sol
|
|
61
|
+
type clp numeric; # Chilean Peso
|
|
62
|
+
type uyu numeric; # Uruguayan Peso
|
|
63
|
+
|
|
64
|
+
# Other notable currencies
|
|
65
|
+
type isk numeric; # Icelandic Krona
|
|
66
|
+
type xof numeric; # West African CFA Franc
|
|
67
|
+
type xaf numeric; # Central African CFA Franc
|
trilogy/std/net.preql
ADDED
|
File without changes
|
|
File without changes
|
|
File without changes
|