@ai-devtools/dbspec-macos-arm64 1.5.11 → 1.6.0
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/pyproject.toml +1 -1
- package/bin/dbspec/_internal/sqlalchemy/engine/_processors_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/sqlalchemy/engine/_result_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/sqlalchemy/engine/_row_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/sqlalchemy/engine/_util_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/sqlalchemy/sql/_cache_key_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/sqlalchemy/sql/_util_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/sqlalchemy/util/_collections_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/sqlalchemy/util/_immutabledict_cy.cpython-313-darwin.so +0 -0
- package/bin/dbspec/_internal/src/resources/sqlalchemy_templates/README.md +2 -0
- package/bin/dbspec/_internal/src/resources/sqlalchemy_templates/model.py.j2 +15 -4
- package/bin/dbspec/dbspec +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -68,3 +68,5 @@ Jinja-параметров, зависящий только от стандар
|
|
|
68
68
|
от исходников или пакета DBSpec. Ресурс входит в существующее пакетирование `*.j2`
|
|
69
69
|
и сборку frozen CLI; изменения проверяются тестами scanner/comparator и
|
|
70
70
|
изолированным subprocess без site-packages.
|
|
71
|
+
|
|
72
|
+
В 1.6.0 IndexContext содержит directions (ASC/DESC/пустая строка) в порядке columns и has_directions. Для направленных unique indexes используйте Index(unique=True), а не UniqueConstraint. Направления передаются методами SQLAlchemy .asc()/.desc(). Проектные шаблоны обновляются отдельно.
|
|
@@ -114,7 +114,7 @@ from ..{{ common_dir_name }}.base import metadata
|
|
|
114
114
|
),
|
|
115
115
|
{% endfor %}
|
|
116
116
|
{% for idx in table.indexes %}
|
|
117
|
-
{% if idx.unique and not idx.where %}
|
|
117
|
+
{% if idx.unique and not idx.where and not idx.has_directions %}
|
|
118
118
|
UniqueConstraint(
|
|
119
119
|
{% for c in idx.columns %}
|
|
120
120
|
"{{ c }}",
|
|
@@ -129,11 +129,11 @@ from ..{{ common_dir_name }}.base import metadata
|
|
|
129
129
|
{% endif %}
|
|
130
130
|
)
|
|
131
131
|
{% for idx in table.indexes %}
|
|
132
|
-
{% if idx.where or not idx.unique %}
|
|
132
|
+
{% if idx.where or not idx.unique or idx.has_directions %}
|
|
133
133
|
Index(
|
|
134
134
|
"{{ idx.name }}",
|
|
135
135
|
{% for c in idx.columns %}
|
|
136
|
-
{{ table.module_name }}.c
|
|
136
|
+
{{ table.module_name }}.c[{{ c | py_repr }}]{% if idx.directions[loop.index0] %}.{{ idx.directions[loop.index0] | lower }}(){% endif %},
|
|
137
137
|
{% endfor %}
|
|
138
138
|
{% if idx.unique %}
|
|
139
139
|
unique=True,
|
|
@@ -239,7 +239,18 @@ class {{ table.class_name }}({{ base_class }}):
|
|
|
239
239
|
),
|
|
240
240
|
{% endfor %}
|
|
241
241
|
{% for idx in table.indexes %}
|
|
242
|
-
{% if idx.
|
|
242
|
+
{% if idx.has_directions %}
|
|
243
|
+
Index(
|
|
244
|
+
{{ idx.name | py_repr }},
|
|
245
|
+
{% for c in idx.columns %}
|
|
246
|
+
{% if idx.directions[loop.index0] %}column({{ c | py_repr }}).{{ idx.directions[loop.index0] | lower }}(){% else %}{{ c | py_repr }}{% endif %},
|
|
247
|
+
{% endfor %}
|
|
248
|
+
unique={{ 'True' if idx.unique else 'False' }},
|
|
249
|
+
{% if idx.where %}
|
|
250
|
+
postgresql_where=text({{ idx.where | py_repr }}),
|
|
251
|
+
{% endif %}
|
|
252
|
+
),
|
|
253
|
+
{% elif idx.where and idx.unique %}
|
|
243
254
|
Index(
|
|
244
255
|
"{{ idx.name }}",
|
|
245
256
|
{% for c in idx.columns %}
|
package/bin/dbspec/dbspec
CHANGED
|
Binary file
|
package/package.json
CHANGED