sql-athame 0.4.0a2__py3-none-any.whl → 0.4.0a4__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.
- sql_athame/dataclasses.py +4 -0
- {sql_athame-0.4.0a2.dist-info → sql_athame-0.4.0a4.dist-info}/METADATA +1 -1
- {sql_athame-0.4.0a2.dist-info → sql_athame-0.4.0a4.dist-info}/RECORD +5 -5
- {sql_athame-0.4.0a2.dist-info → sql_athame-0.4.0a4.dist-info}/LICENSE +0 -0
- {sql_athame-0.4.0a2.dist-info → sql_athame-0.4.0a4.dist-info}/WHEEL +0 -0
sql_athame/dataclasses.py
CHANGED
@@ -440,6 +440,7 @@ class ModelBase(Mapping[str, Any]):
|
|
440
440
|
async def insert_multiple_array_safe(
|
441
441
|
cls: Type[T], connection_or_pool: Union[Connection, Pool], rows: Iterable[T]
|
442
442
|
) -> str:
|
443
|
+
last = ""
|
443
444
|
for chunk in chunked(rows, 100):
|
444
445
|
last = await connection_or_pool.execute(
|
445
446
|
*cls.insert_multiple_array_safe_sql(chunk)
|
@@ -467,6 +468,7 @@ class ModelBase(Mapping[str, Any]):
|
|
467
468
|
async def upsert_multiple_array_safe(
|
468
469
|
cls: Type[T], connection_or_pool: Union[Connection, Pool], rows: Iterable[T]
|
469
470
|
) -> str:
|
471
|
+
last = ""
|
470
472
|
for chunk in chunked(rows, 100):
|
471
473
|
last = await connection_or_pool.execute(
|
472
474
|
*cls.upsert_sql(cls.insert_multiple_array_safe_sql(chunk))
|
@@ -595,5 +597,7 @@ class ModelBase(Mapping[str, Any]):
|
|
595
597
|
|
596
598
|
|
597
599
|
def chunked(lst, n):
|
600
|
+
if type(lst) is not list:
|
601
|
+
lst = list(lst)
|
598
602
|
for i in range(0, len(lst), n):
|
599
603
|
yield lst[i : i + n]
|
@@ -1,11 +1,11 @@
|
|
1
1
|
sql_athame/__init__.py,sha256=rzUQcbzmj3qkPZpL9jI_ALTRv-e1pAV4jSCryWkutlk,130
|
2
2
|
sql_athame/base.py,sha256=fSnHQhh5ULeJ5q32RVUAvpWtF0qoY61B2gEEP59Nrpo,10350
|
3
|
-
sql_athame/dataclasses.py,sha256=
|
3
|
+
sql_athame/dataclasses.py,sha256=EPq9wd2mqcEvT0kAEhrZztlDDV3Hroiwa8GoP3hi_l8,19787
|
4
4
|
sql_athame/escape.py,sha256=LXExbiYtc407yDU4vPieyY2Pq5nypsJFfBc_2-gsbUg,743
|
5
5
|
sql_athame/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
sql_athame/sqlalchemy.py,sha256=c-pCLE11hTh5I19rY1Vp5E7P7lAaj9i-i7ko2L8rlF4,1305
|
7
7
|
sql_athame/types.py,sha256=7P4OyY0ezRlb2UDD9lpdXiLChnhQcBvHWaG_PKy3jmE,412
|
8
|
-
sql_athame-0.4.
|
9
|
-
sql_athame-0.4.
|
10
|
-
sql_athame-0.4.
|
11
|
-
sql_athame-0.4.
|
8
|
+
sql_athame-0.4.0a4.dist-info/LICENSE,sha256=xqV29vPFqITcKifYrGPgVIBjq4fdmLSwY3gRUtDKafg,1076
|
9
|
+
sql_athame-0.4.0a4.dist-info/METADATA,sha256=J5gkrkq4cAwD81oODgQjugY9y3k7-RImhFvqLMaJqr4,12845
|
10
|
+
sql_athame-0.4.0a4.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
11
|
+
sql_athame-0.4.0a4.dist-info/RECORD,,
|
File without changes
|
File without changes
|