sql-blocks 1.25.518999999999__tar.gz → 1.25.528999999999__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.
- {sql_blocks-1.25.518999999999/sql_blocks.egg-info → sql_blocks-1.25.528999999999}/PKG-INFO +1 -1
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/pyproject.toml +1 -1
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/setup.py +1 -1
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/sql_blocks/sql_blocks.py +6 -19
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999/sql_blocks.egg-info}/PKG-INFO +1 -1
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/LICENSE +0 -0
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/README.md +0 -0
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/setup.cfg +0 -0
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/sql_blocks/__init__.py +0 -0
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/sql_blocks.egg-info/SOURCES.txt +0 -0
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/sql_blocks.egg-info/dependency_links.txt +0 -0
- {sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/sql_blocks.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sql_blocks
|
3
|
-
Version: 1.25.
|
3
|
+
Version: 1.25.528999999999
|
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
|
@@ -131,6 +131,7 @@ class SQLObject:
|
|
131
131
|
return s1 - s2
|
132
132
|
|
133
133
|
def delete(self, search: str, keys: list=USUAL_KEYS, exact: bool=False):
|
134
|
+
search = re.escape(search)
|
134
135
|
if exact:
|
135
136
|
not_match = lambda item: not re.search(fr'\w*[.]*{search}$', item)
|
136
137
|
else:
|
@@ -1437,7 +1438,11 @@ class CypherParser(Parser):
|
|
1437
1438
|
raise ValueError(f'Unknown function `{func_name}`.')
|
1438
1439
|
if ':' in token:
|
1439
1440
|
token, field_alias = token.split(':')
|
1440
|
-
|
1441
|
+
if extra_classes == [OrderBy]:
|
1442
|
+
class_type = class_type().As(field_alias, OrderBy)
|
1443
|
+
extra_classes = []
|
1444
|
+
else:
|
1445
|
+
class_type = class_type().As(field_alias)
|
1441
1446
|
class_list = [class_type]
|
1442
1447
|
class_list += extra_classes
|
1443
1448
|
FieldList(token, class_list).add('', self.queries[-1])
|
@@ -2042,21 +2047,3 @@ def detect(text: str, join_queries: bool = True, format: str='') -> Select | lis
|
|
2042
2047
|
return result
|
2043
2048
|
# ===========================================================================================//
|
2044
2049
|
|
2045
|
-
|
2046
|
-
if __name__ == "__main__":
|
2047
|
-
query = detect("""
|
2048
|
-
SELECT
|
2049
|
-
e.gender, d.region,
|
2050
|
-
Avg(e.age)
|
2051
|
-
FROM
|
2052
|
-
Employees e
|
2053
|
-
JOIN Departments d ON (e.depto_id = d.id)
|
2054
|
-
WHERE
|
2055
|
-
e.name LIKE 'A%'
|
2056
|
-
GROUP BY
|
2057
|
-
e.gender, d.region
|
2058
|
-
ORDER BY
|
2059
|
-
d.region DESC
|
2060
|
-
""")
|
2061
|
-
PandasLanguage.file_extension = FileExtension.XLSX
|
2062
|
-
print( query.translate_to(PandasLanguage) )
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sql_blocks
|
3
|
-
Version: 1.25.
|
3
|
+
Version: 1.25.528999999999
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/sql_blocks.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{sql_blocks-1.25.518999999999 → sql_blocks-1.25.528999999999}/sql_blocks.egg-info/top_level.txt
RENAMED
File without changes
|