sql-blocks 0.1.3__py3-none-any.whl → 0.1.4__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.
- sql_blocks/sql_blocks.py +6 -2
- {sql_blocks-0.1.3.dist-info → sql_blocks-0.1.4.dist-info}/METADATA +1 -1
- sql_blocks-0.1.4.dist-info/RECORD +7 -0
- sql_blocks-0.1.3.dist-info/RECORD +0 -7
- {sql_blocks-0.1.3.dist-info → sql_blocks-0.1.4.dist-info}/LICENSE +0 -0
- {sql_blocks-0.1.3.dist-info → sql_blocks-0.1.4.dist-info}/WHEEL +0 -0
- {sql_blocks-0.1.3.dist-info → sql_blocks-0.1.4.dist-info}/top_level.txt +0 -0
sql_blocks/sql_blocks.py
CHANGED
@@ -74,14 +74,18 @@ class SQLObject:
|
|
74
74
|
if symmetrical:
|
75
75
|
fld = fld.lower()
|
76
76
|
return fld.strip()
|
77
|
-
|
77
|
+
def is_named_field(fld: str) -> bool:
|
78
|
+
return key == SELECT and re.search(' as | AS ', fld)
|
78
79
|
pattern = KEYWORD[key][2]
|
79
80
|
if key == WHERE and symmetrical:
|
80
81
|
pattern = f'{PATTERN_PREFIX}| '
|
81
82
|
separator = self.get_separator(key)
|
82
83
|
def field_set(source: list) -> set:
|
83
84
|
return set(
|
84
|
-
|
85
|
+
(
|
86
|
+
fld if is_named_field(fld) else
|
87
|
+
re.sub(pattern, '', cleanup(fld))
|
88
|
+
)
|
85
89
|
for string in source
|
86
90
|
for fld in re.split(separator, string)
|
87
91
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sql_blocks
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.4
|
4
4
|
Summary: Allows you to create objects for parts of SQL query commands. Also to combine these objects by joining them, adding or removing parts...
|
5
5
|
Home-page: https://github.com/julio-cascalles/sql_blocks
|
6
6
|
Author: Júlio Cascalles
|
@@ -0,0 +1,7 @@
|
|
1
|
+
sql_blocks/__init__.py,sha256=5ItzGCyqqa6kwY8wvF9kapyHsAiWJ7KEXCcC-OtdXKg,37
|
2
|
+
sql_blocks/sql_blocks.py,sha256=wj54KGT9Bnbo9Jtyn_jA6lbHhgkmGirRUp6ZHq9ilZ8,20654
|
3
|
+
sql_blocks-0.1.4.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
4
|
+
sql_blocks-0.1.4.dist-info/METADATA,sha256=DWqKIgeFG_wjr8u4qusK-bcb_cgbxHXZ3DNFUXmMwKo,8503
|
5
|
+
sql_blocks-0.1.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
sql_blocks-0.1.4.dist-info/top_level.txt,sha256=57AbUvUjYNy4m1EqDaU3WHeP-uyIAfV0n8GAUp1a1YQ,11
|
7
|
+
sql_blocks-0.1.4.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
sql_blocks/__init__.py,sha256=5ItzGCyqqa6kwY8wvF9kapyHsAiWJ7KEXCcC-OtdXKg,37
|
2
|
-
sql_blocks/sql_blocks.py,sha256=RDOzn5zfqyYnzSI82hlglwOzTxzFIpmo3pEJHDGidAw,20506
|
3
|
-
sql_blocks-0.1.3.dist-info/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
4
|
-
sql_blocks-0.1.3.dist-info/METADATA,sha256=HmO5q0vmHuReqiAl0lO1__hvmq8vOtYH7HPJQWOqQxo,8503
|
5
|
-
sql_blocks-0.1.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
sql_blocks-0.1.3.dist-info/top_level.txt,sha256=57AbUvUjYNy4m1EqDaU3WHeP-uyIAfV0n8GAUp1a1YQ,11
|
7
|
-
sql_blocks-0.1.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|