t-sql 4.4.0__tar.gz → 4.4.1__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.
- {t_sql-4.4.0 → t_sql-4.4.1}/PKG-INFO +1 -1
- {t_sql-4.4.0 → t_sql-4.4.1}/pyproject.toml +1 -1
- {t_sql-4.4.0 → t_sql-4.4.1}/tsql/query_builder.py +7 -7
- {t_sql-4.4.0 → t_sql-4.4.1}/.dockerignore +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/.github/workflows/publish.yml +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/.github/workflows/test.yml +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/.gitignore +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/Dockerfile +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/LICENSE +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/README.md +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/compose.yaml +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/context7.json +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/pytest.ini +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_alembic_integration.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_asyncpg_integration.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_different_object_types.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_escaped.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_escaped_binary_hex.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_helper_functions.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_injection_edge_cases.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_injection_protection_validation.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_injections_for_escaped.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_mysql_integration.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_parameter_names.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_query_builder.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_sqlalchemy_integration.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_sqlite_integration.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_styles.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_tsql.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tests/test_type_processor.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tsql/__init__.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tsql/styles.py +0 -0
- {t_sql-4.4.0 → t_sql-4.4.1}/tsql/type_processor.py +0 -0
|
@@ -566,6 +566,9 @@ class QueryBuilder(ABC):
|
|
|
566
566
|
database values back to Python values (e.g., decrypt encrypted fields,
|
|
567
567
|
deserialize JSON, etc.).
|
|
568
568
|
|
|
569
|
+
Preserves the original row object type when possible by updating values
|
|
570
|
+
in place rather than creating new dictionaries.
|
|
571
|
+
|
|
569
572
|
Args:
|
|
570
573
|
rows: List of dictionaries from database query results
|
|
571
574
|
|
|
@@ -585,16 +588,13 @@ class QueryBuilder(ABC):
|
|
|
585
588
|
# Convert row to dict if it's not already (some drivers return Record objects)
|
|
586
589
|
row_dict = dict(row) if not isinstance(row, dict) else row
|
|
587
590
|
|
|
588
|
-
# Apply type processors
|
|
589
|
-
|
|
590
|
-
for col_name, value in row_dict.items():
|
|
591
|
+
# Apply type processors in place
|
|
592
|
+
for col_name in list(row_dict.keys()):
|
|
591
593
|
if col_name in self.base_table._type_processors:
|
|
592
594
|
processor = self.base_table._type_processors[col_name]
|
|
593
|
-
|
|
594
|
-
else:
|
|
595
|
-
transformed[col_name] = value
|
|
595
|
+
row_dict[col_name] = processor.process_result_value(row_dict[col_name])
|
|
596
596
|
|
|
597
|
-
results.append(
|
|
597
|
+
results.append(row_dict)
|
|
598
598
|
|
|
599
599
|
return results
|
|
600
600
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|