arpakitlib 1.8.222__py3-none-any.whl → 1.8.224__py3-none-any.whl
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.
- arpakitlib/ar_sqlalchemy_util.py +10 -2
- {arpakitlib-1.8.222.dist-info → arpakitlib-1.8.224.dist-info}/METADATA +1 -1
- {arpakitlib-1.8.222.dist-info → arpakitlib-1.8.224.dist-info}/RECORD +6 -6
- {arpakitlib-1.8.222.dist-info → arpakitlib-1.8.224.dist-info}/LICENSE +0 -0
- {arpakitlib-1.8.222.dist-info → arpakitlib-1.8.224.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.222.dist-info → arpakitlib-1.8.224.dist-info}/entry_points.txt +0 -0
arpakitlib/ar_sqlalchemy_util.py
CHANGED
@@ -72,7 +72,8 @@ class BaseDBM(DeclarativeBase):
|
|
72
72
|
cls,
|
73
73
|
*,
|
74
74
|
include_pk: bool = True,
|
75
|
-
exclude_names: list[str] | None = None
|
75
|
+
exclude_names: list[str] | None = None,
|
76
|
+
exclude_if_have_foreign_keys: bool = False
|
76
77
|
) -> list[str]:
|
77
78
|
if exclude_names is None:
|
78
79
|
exclude_names = []
|
@@ -82,6 +83,8 @@ class BaseDBM(DeclarativeBase):
|
|
82
83
|
continue
|
83
84
|
if c.key in exclude_names:
|
84
85
|
continue
|
86
|
+
if exclude_if_have_foreign_keys and c.foreign_keys:
|
87
|
+
continue
|
85
88
|
res.append(c.key)
|
86
89
|
return res
|
87
90
|
|
@@ -120,6 +123,7 @@ class BaseDBM(DeclarativeBase):
|
|
120
123
|
include_column_names: bool = True,
|
121
124
|
include_column_pk: bool = True,
|
122
125
|
exclude_column_names: list[str] | None = None,
|
126
|
+
exclude_column_names_if_have_foreign_keys: bool = False,
|
123
127
|
|
124
128
|
include_relationship_names: bool = True,
|
125
129
|
exclude_relationship_one_to_many: bool = False,
|
@@ -129,7 +133,11 @@ class BaseDBM(DeclarativeBase):
|
|
129
133
|
) -> list[str]:
|
130
134
|
res = []
|
131
135
|
if include_column_names:
|
132
|
-
res += cls.get_column_names_(
|
136
|
+
res += cls.get_column_names_(
|
137
|
+
include_pk=include_column_pk,
|
138
|
+
exclude_names=exclude_column_names,
|
139
|
+
exclude_if_have_foreign_keys=exclude_column_names_if_have_foreign_keys
|
140
|
+
)
|
133
141
|
if include_relationship_names:
|
134
142
|
res += cls.get_relationship_names_(
|
135
143
|
exclude_names=exclude_relationship_names,
|
@@ -411,14 +411,14 @@ arpakitlib/ar_schedule_uust_api_client_util.py,sha256=rXI2_3OTaIBgR-GixM1Ti-Ue1f
|
|
411
411
|
arpakitlib/ar_settings_util.py,sha256=Y5wi_cmsjDjfJpM0VJHjbo0NoVPKfypKaD1USowwDtQ,1327
|
412
412
|
arpakitlib/ar_sleep_util.py,sha256=ggaj7ML6QK_ADsHMcyu6GUmUpQ_9B9n-SKYH17h-9lM,1045
|
413
413
|
arpakitlib/ar_sqladmin_util.py,sha256=SEoaowAPF3lhxPsNjwmOymNJ55Ty9rmzvsDm7gD5Ceo,861
|
414
|
-
arpakitlib/ar_sqlalchemy_util.py,sha256=
|
414
|
+
arpakitlib/ar_sqlalchemy_util.py,sha256=aNHK7kT1VNSHmGx8m6KsaLOZ9ofO7pFa10rW4vZe2Bc,15698
|
415
415
|
arpakitlib/ar_str_util.py,sha256=2lGpnXDf2h1cBZpVf5i1tX_HCv5iBd6IGnrCw4QWWlY,4350
|
416
416
|
arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,4049
|
417
417
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
|
418
418
|
arpakitlib/clone_pydantic_model_fields.py,sha256=Gn9_AIjKknN1eIYK_xH_cMyff3hjOpfwRqs583-rnJs,1167
|
419
419
|
arpakitlib/pydantic_schema_from_sqlalchemy_model.py,sha256=bjLNfeJRZonvVl7pnczwL8OzxbIGawulp30K-xYY7yA,2833
|
420
|
-
arpakitlib-1.8.
|
421
|
-
arpakitlib-1.8.
|
422
|
-
arpakitlib-1.8.
|
423
|
-
arpakitlib-1.8.
|
424
|
-
arpakitlib-1.8.
|
420
|
+
arpakitlib-1.8.224.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
421
|
+
arpakitlib-1.8.224.dist-info/METADATA,sha256=IKpdAaVIOetmht0Iy7_y7cqDlLXTQ8ibECaM4ejrQsE,3741
|
422
|
+
arpakitlib-1.8.224.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
423
|
+
arpakitlib-1.8.224.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
424
|
+
arpakitlib-1.8.224.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|