TypeDAL 3.10.3__py3-none-any.whl → 3.10.4__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.
Potentially problematic release.
This version of TypeDAL might be problematic. Click here for more details.
- typedal/__about__.py +1 -1
- typedal/cli.py +1 -2
- typedal/core.py +16 -8
- {typedal-3.10.3.dist-info → typedal-3.10.4.dist-info}/METADATA +1 -1
- {typedal-3.10.3.dist-info → typedal-3.10.4.dist-info}/RECORD +7 -7
- {typedal-3.10.3.dist-info → typedal-3.10.4.dist-info}/WHEEL +0 -0
- {typedal-3.10.3.dist-info → typedal-3.10.4.dist-info}/entry_points.txt +0 -0
typedal/__about__.py
CHANGED
typedal/cli.py
CHANGED
|
@@ -392,8 +392,7 @@ def fake_migrations(
|
|
|
392
392
|
|
|
393
393
|
previously_migrated = (
|
|
394
394
|
db(
|
|
395
|
-
db.ewh_implemented_features.name.belongs(to_fake)
|
|
396
|
-
& (db.ewh_implemented_features.installed == True) # noqa E712
|
|
395
|
+
db.ewh_implemented_features.name.belongs(to_fake) & (db.ewh_implemented_features.installed == True) # noqa E712
|
|
397
396
|
)
|
|
398
397
|
.select(db.ewh_implemented_features.name)
|
|
399
398
|
.column("name")
|
typedal/core.py
CHANGED
|
@@ -1186,7 +1186,8 @@ class TableMeta(type):
|
|
|
1186
1186
|
"""
|
|
1187
1187
|
Add a before insert hook.
|
|
1188
1188
|
"""
|
|
1189
|
-
cls._before_insert
|
|
1189
|
+
if fn not in cls._before_insert:
|
|
1190
|
+
cls._before_insert.append(fn)
|
|
1190
1191
|
return cls
|
|
1191
1192
|
|
|
1192
1193
|
def after_insert(
|
|
@@ -1199,7 +1200,8 @@ class TableMeta(type):
|
|
|
1199
1200
|
"""
|
|
1200
1201
|
Add an after insert hook.
|
|
1201
1202
|
"""
|
|
1202
|
-
cls._after_insert
|
|
1203
|
+
if fn not in cls._after_insert:
|
|
1204
|
+
cls._after_insert.append(fn)
|
|
1203
1205
|
return cls
|
|
1204
1206
|
|
|
1205
1207
|
def before_update(
|
|
@@ -1209,7 +1211,8 @@ class TableMeta(type):
|
|
|
1209
1211
|
"""
|
|
1210
1212
|
Add a before update hook.
|
|
1211
1213
|
"""
|
|
1212
|
-
cls._before_update
|
|
1214
|
+
if fn not in cls._before_update:
|
|
1215
|
+
cls._before_update.append(fn)
|
|
1213
1216
|
return cls
|
|
1214
1217
|
|
|
1215
1218
|
def after_update(
|
|
@@ -1219,21 +1222,24 @@ class TableMeta(type):
|
|
|
1219
1222
|
"""
|
|
1220
1223
|
Add an after update hook.
|
|
1221
1224
|
"""
|
|
1222
|
-
cls._after_update
|
|
1225
|
+
if fn not in cls._after_update:
|
|
1226
|
+
cls._after_update.append(fn)
|
|
1223
1227
|
return cls
|
|
1224
1228
|
|
|
1225
1229
|
def before_delete(cls: Type[T_MetaInstance], fn: typing.Callable[[Set], Optional[bool]]) -> Type[T_MetaInstance]:
|
|
1226
1230
|
"""
|
|
1227
1231
|
Add a before delete hook.
|
|
1228
1232
|
"""
|
|
1229
|
-
cls._before_delete
|
|
1233
|
+
if fn not in cls._before_delete:
|
|
1234
|
+
cls._before_delete.append(fn)
|
|
1230
1235
|
return cls
|
|
1231
1236
|
|
|
1232
1237
|
def after_delete(cls: Type[T_MetaInstance], fn: typing.Callable[[Set], Optional[bool]]) -> Type[T_MetaInstance]:
|
|
1233
1238
|
"""
|
|
1234
1239
|
Add an after delete hook.
|
|
1235
1240
|
"""
|
|
1236
|
-
cls._after_delete
|
|
1241
|
+
if fn not in cls._after_delete:
|
|
1242
|
+
cls._after_delete.append(fn)
|
|
1237
1243
|
return cls
|
|
1238
1244
|
|
|
1239
1245
|
|
|
@@ -1257,7 +1263,10 @@ class TypedField(Expression, typing.Generic[T_Value]): # pragma: no cover
|
|
|
1257
1263
|
# NOTE: for the logic of converting a TypedField into a pydal Field, see TypeDAL._to_field
|
|
1258
1264
|
|
|
1259
1265
|
def __init__(
|
|
1260
|
-
self,
|
|
1266
|
+
self,
|
|
1267
|
+
_type: Type[T_Value] | types.UnionType = str,
|
|
1268
|
+
/,
|
|
1269
|
+
**settings: Unpack[FieldSettings], # type: ignore
|
|
1261
1270
|
) -> None:
|
|
1262
1271
|
"""
|
|
1263
1272
|
Typed version of pydal.Field, which will be converted to a normal Field in the background.
|
|
@@ -2623,7 +2632,6 @@ class QueryBuilder(typing.Generic[T_MetaInstance]):
|
|
|
2623
2632
|
join.append(other.on(condition))
|
|
2624
2633
|
|
|
2625
2634
|
if limitby := select_kwargs.pop("limitby", ()):
|
|
2626
|
-
|
|
2627
2635
|
# if limitby + relationships:
|
|
2628
2636
|
# 1. get IDs of main table entries that match 'query'
|
|
2629
2637
|
# 2. change query to .belongs(id)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
typedal/__about__.py,sha256=
|
|
1
|
+
typedal/__about__.py,sha256=2Vvj1VV-RMYZORQ_Uf9kaat2dwPYESRmKaCDJDSrAWI,207
|
|
2
2
|
typedal/__init__.py,sha256=QQpLiVl9w9hm2LBxey49Y_tCF_VB2bScVaS_mCjYy54,366
|
|
3
3
|
typedal/caching.py,sha256=SMcJsahLlZ79yykWCveERFx1ZJUNEKhA9SPmCTIuLp8,11798
|
|
4
|
-
typedal/cli.py,sha256=
|
|
4
|
+
typedal/cli.py,sha256=FInI6LuhCbJXhh6qAqXpaPPckdkIQKGydnGYOo0_cm8,19253
|
|
5
5
|
typedal/config.py,sha256=0qy1zrTUdtmXPM9jHzFnSR1DJsqGJqcdG6pvhzKQHe0,11625
|
|
6
|
-
typedal/core.py,sha256=
|
|
6
|
+
typedal/core.py,sha256=OhzLscxfYJjKf4yQgCcp45dGqkkJILy7J-oklqH7Ua8,103043
|
|
7
7
|
typedal/fields.py,sha256=ThkI0_E6Oq_2Vj30j0AWHRSOLvUEPu1gyECtStoECjs,6556
|
|
8
8
|
typedal/for_py4web.py,sha256=plb08K6HmxbM1_5GuBFFzovAJIT7Q3g9ocNjUJOBngY,1946
|
|
9
9
|
typedal/for_web2py.py,sha256=xn7zo6ImsmTkH6LacbjLQl2oqyBvP0zLqRxEJvMQk1w,1929
|
|
@@ -13,7 +13,7 @@ typedal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
13
13
|
typedal/types.py,sha256=1FIgv1s0be0E8r5Wd9E1nvDvK4ETV8u2NlfI7_P6UUY,6752
|
|
14
14
|
typedal/web2py_py4web_shared.py,sha256=VK9T8P5UwVLvfNBsY4q79ANcABv-jX76YKADt1Zz_co,1539
|
|
15
15
|
typedal/serializers/as_json.py,sha256=ffo152W-sARYXym4BzwX709rrO2-QwKk2KunWY8RNl4,2229
|
|
16
|
-
typedal-3.10.
|
|
17
|
-
typedal-3.10.
|
|
18
|
-
typedal-3.10.
|
|
19
|
-
typedal-3.10.
|
|
16
|
+
typedal-3.10.4.dist-info/METADATA,sha256=dJY0ytQ8-xlcHnek4WiOcuMSTV-hfmhV4XLMMW8o2sg,10451
|
|
17
|
+
typedal-3.10.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
18
|
+
typedal-3.10.4.dist-info/entry_points.txt,sha256=m1wqcc_10rHWPdlQ71zEkmJDADUAnZtn7Jac_6mbyUc,44
|
|
19
|
+
typedal-3.10.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|