velocity-python 0.0.68__tar.gz → 0.0.69__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.
- {velocity_python-0.0.68 → velocity_python-0.0.69}/PKG-INFO +1 -1
- {velocity_python-0.0.68 → velocity_python-0.0.69}/pyproject.toml +1 -1
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/__init__.py +1 -1
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/sql.py +2 -5
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/tablehelper.py +8 -4
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity_python.egg-info/PKG-INFO +1 -1
- {velocity_python-0.0.68 → velocity_python-0.0.69}/LICENSE +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/README.md +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/setup.cfg +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/aws/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/aws/handlers/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/aws/handlers/context.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/aws/handlers/lambda_handler.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/aws/handlers/response.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/aws/handlers/sqs_handler.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/column.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/database.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/decorators.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/engine.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/exceptions.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/result.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/row.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/sequence.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/table.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/core/transaction.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/mysql.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/mysql_reserved.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/operators.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/reserved.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/types.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/sqlite.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/sqlite_reserved.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/sqlserver.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/sqlserver_reserved.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/conv/__init__.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/conv/iconv.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/conv/oconv.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/db.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/export.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/format.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/mail.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/merge.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/timer.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/misc/tools.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity_python.egg-info/SOURCES.txt +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity_python.egg-info/dependency_links.txt +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity_python.egg-info/requires.txt +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity_python.egg-info/top_level.txt +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_db.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_email_processing.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_format.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_iconv.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_merge.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_oconv.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_postgres.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_response.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_spreadsheet_functions.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_sql_builder.py +0 -0
- {velocity_python-0.0.68 → velocity_python-0.0.69}/tests/test_timer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: velocity-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.69
|
|
4
4
|
Summary: A rapid application development library for interfacing with data storage
|
|
5
5
|
Author-email: Paul Perez <pperez@codeclubs.org>
|
|
6
6
|
Project-URL: Homepage, https://codeclubs.org/projects/velocity
|
|
@@ -110,16 +110,13 @@ class SQL:
|
|
|
110
110
|
"distinct" in c.lower() for c in columns
|
|
111
111
|
): # Check if "distinct" exists in any entry
|
|
112
112
|
distinct = True
|
|
113
|
-
columns = [
|
|
114
|
-
c.replace("distinct", "", 1).strip() if "distinct" in c.lower() else c
|
|
115
|
-
for c in columns
|
|
116
|
-
]
|
|
113
|
+
columns = [re.sub(r"(?i)\bdistinct\b", "", c).strip() for c in columns]
|
|
117
114
|
|
|
118
115
|
processed_columns = []
|
|
119
116
|
for col in columns:
|
|
120
117
|
processed_columns.append(
|
|
121
118
|
th.resolve_references(
|
|
122
|
-
col, options={"alias_column": True, "alias_table": True}
|
|
119
|
+
col, options={"alias_column": True, "alias_table": True, bypass_on_error=True}
|
|
123
120
|
)
|
|
124
121
|
)
|
|
125
122
|
|
|
@@ -90,14 +90,18 @@ class TableHelper:
|
|
|
90
90
|
Resolves pointer syntax or table alias references.
|
|
91
91
|
`options` can control whether to alias columns and/or tables.
|
|
92
92
|
"""
|
|
93
|
+
if not key:
|
|
94
|
+
raise Exception(f"Invalid key={key}")
|
|
93
95
|
if options is None:
|
|
94
96
|
options = {"alias_column": True, "alias_table": False, "alias_only": False}
|
|
95
|
-
|
|
96
97
|
column = self.extract_column_name(key)
|
|
97
|
-
alias = self.get_table_alias("current_table")
|
|
98
|
-
if not key or not column:
|
|
99
|
-
raise Exception(f"Invalid key or column: key={key}, column={column}")
|
|
100
98
|
|
|
99
|
+
if not column:
|
|
100
|
+
if options.get("bypass_on_error"):
|
|
101
|
+
return key
|
|
102
|
+
raise Exception(f"Invalid column={column}")
|
|
103
|
+
|
|
104
|
+
alias = self.get_table_alias("current_table")
|
|
101
105
|
if not self.has_pointer(column):
|
|
102
106
|
# Standard column
|
|
103
107
|
if options.get("alias_table") and alias != "A":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: velocity-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.69
|
|
4
4
|
Summary: A rapid application development library for interfacing with data storage
|
|
5
5
|
Author-email: Paul Perez <pperez@codeclubs.org>
|
|
6
6
|
Project-URL: Homepage, https://codeclubs.org/projects/velocity
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/aws/handlers/lambda_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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/__init__.py
RENAMED
|
File without changes
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/operators.py
RENAMED
|
File without changes
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/postgres/reserved.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/sqlite_reserved.py
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity/db/servers/sqlserver_reserved.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
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{velocity_python-0.0.68 → velocity_python-0.0.69}/src/velocity_python.egg-info/top_level.txt
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
|