@ai-devtools/dbspec-linux-x64 1.5.7 → 1.5.8
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.
- package/bin/dbspec/_internal/base_library.zip +0 -0
- package/bin/dbspec/_internal/dbspec.egg-info/PKG-INFO +1 -1
- package/bin/dbspec/_internal/dbspec.egg-info/SOURCES.txt +3 -0
- package/bin/dbspec/_internal/pyproject.toml +1 -1
- package/bin/dbspec/_internal/src/resources/sqlalchemy_templates/collation_helper.py.j2 +16 -0
- package/bin/dbspec/dbspec +0 -0
- package/package.json +1 -1
|
Binary file
|
|
@@ -88,6 +88,7 @@ src/migrations/autogenerate_enums.py
|
|
|
88
88
|
src/migrations/autogenerate_pk.py
|
|
89
89
|
src/migrations/autogenerate_renames.py
|
|
90
90
|
src/migrations/collation_catalog.py
|
|
91
|
+
src/migrations/collation_rendering.py
|
|
91
92
|
src/migrations/collations.py
|
|
92
93
|
src/migrations/commands.py
|
|
93
94
|
src/migrations/defaults.py
|
|
@@ -126,6 +127,7 @@ src/resources/__init__.py
|
|
|
126
127
|
src/resources/sqlalchemy_templates/README.md
|
|
127
128
|
src/resources/sqlalchemy_templates/__init__.py
|
|
128
129
|
src/resources/sqlalchemy_templates/base.py.j2
|
|
130
|
+
src/resources/sqlalchemy_templates/collation_helper.py.j2
|
|
129
131
|
src/resources/sqlalchemy_templates/domain_init.py.j2
|
|
130
132
|
src/resources/sqlalchemy_templates/model.py.j2
|
|
131
133
|
src/resources/sqlalchemy_templates/package_init.py.j2
|
|
@@ -253,6 +255,7 @@ src/utils/postgres_types.py
|
|
|
253
255
|
src/utils/progress.py
|
|
254
256
|
src/utils/reference_sheets.py
|
|
255
257
|
src/utils/sheets.py
|
|
258
|
+
src/utils/sqlalchemy_collations.py
|
|
256
259
|
src/utils/type_casting.py
|
|
257
260
|
src/xlsx/__init__.py
|
|
258
261
|
src/xlsx/formatting.py
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import sqlalchemy as sa
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def _dbspec_collation_kwargs(name: str, schema: str | None = None) -> dict[str, str]:
|
|
5
|
+
"""Keep schema qualification compatible with SQLAlchemy 2.0 and 2.1."""
|
|
6
|
+
if hasattr(sa.String(), "collation_schema"):
|
|
7
|
+
result = {"collation": sa.sql.quoted_name(name, quote=True)}
|
|
8
|
+
if schema is not None:
|
|
9
|
+
result["collation_schema"] = sa.sql.quoted_name(schema, quote=True)
|
|
10
|
+
return result
|
|
11
|
+
escaped_name = name.replace('"', '""')
|
|
12
|
+
if schema is not None:
|
|
13
|
+
escaped_schema = schema.replace('"', '""')
|
|
14
|
+
escaped_name = f'{escaped_schema}"."{escaped_name}'
|
|
15
|
+
return {"collation": escaped_name}
|
|
16
|
+
|
package/bin/dbspec/dbspec
CHANGED
|
Binary file
|
package/package.json
CHANGED