aiteamutils 0.2.165__py3-none-any.whl → 0.2.166__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.
aiteamutils/database.py
CHANGED
@@ -462,14 +462,14 @@ async def list_entities(
|
|
462
462
|
query = select(model)
|
463
463
|
|
464
464
|
# 명시적 조인 적용
|
465
|
+
has_explicit_joins = False
|
465
466
|
if explicit_joins:
|
466
467
|
for join_target in explicit_joins:
|
467
468
|
if isinstance(join_target, tuple):
|
468
|
-
# (모델, 조인조건)이 전달된 경우
|
469
469
|
target_model, join_condition = join_target
|
470
470
|
query = query.outerjoin(target_model, join_condition)
|
471
|
+
has_explicit_joins = True
|
471
472
|
else:
|
472
|
-
# 모델만 전달된 경우
|
473
473
|
query = query.outerjoin(join_target)
|
474
474
|
|
475
475
|
# 로딩 조인 적용
|
@@ -501,8 +501,16 @@ async def list_entities(
|
|
501
501
|
# 페이지네이션 적용
|
502
502
|
query = query.limit(limit).offset(skip)
|
503
503
|
|
504
|
+
# 결과 처리
|
504
505
|
result = await session.execute(query)
|
505
|
-
|
506
|
+
if has_explicit_joins:
|
507
|
+
# 명시적 조인이 있는 경우
|
508
|
+
entities = result.unique().all()
|
509
|
+
return [entity[0] for entity in entities]
|
510
|
+
else:
|
511
|
+
# 기존 방식 유지
|
512
|
+
return result.unique().scalars().all()
|
513
|
+
|
506
514
|
except SQLAlchemyError as e:
|
507
515
|
raise CustomException(
|
508
516
|
ErrorCode.DB_READ_ERROR,
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.166"
|
@@ -4,13 +4,13 @@ aiteamutils/base_repository.py,sha256=Oy2zE1i5qx60Xf1tnsaKLyFWapiPqt5JH8NejwNrPW
|
|
4
4
|
aiteamutils/base_service.py,sha256=JIeRtFn1Ll4Qcq3v88pgS9lmEQLQoVyyOKqYR8n02S4,21192
|
5
5
|
aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
|
6
6
|
aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
|
7
|
-
aiteamutils/database.py,sha256=
|
7
|
+
aiteamutils/database.py,sha256=Kcp_NyXT2DassWovVFBmpFaqgCBzIpP4BRzRhsFKeMM,21892
|
8
8
|
aiteamutils/enums.py,sha256=7WLqlcJqQWtETAga2WAxNp3dJTQIAd2TW-4WzkoHHa8,2498
|
9
9
|
aiteamutils/exceptions.py,sha256=sgIVulllKMM9InTltaB7VD6i7DiQvCoycexsV-BiIBY,16570
|
10
10
|
aiteamutils/files.py,sha256=fxnCu9rErd4vCovMi0jy4adLUiA7rx_q4RdOL4wSgsU,14258
|
11
11
|
aiteamutils/security.py,sha256=McUl3t5Z5SyUDVUHymHdDkYyF4YSeg4g9fFMML4W6Kw,11630
|
12
12
|
aiteamutils/validators.py,sha256=_WHN6jqJQzKM5uPTg-Da8U2qqevS84XeKMkCCF4C_lY,9591
|
13
|
-
aiteamutils/version.py,sha256=
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
16
|
-
aiteamutils-0.2.
|
13
|
+
aiteamutils/version.py,sha256=L8NwAUPTaxDs2LSIrJScDZnaZSAHV_U69VXVSwErXCA,43
|
14
|
+
aiteamutils-0.2.166.dist-info/METADATA,sha256=qy8U-j7_6Pagb_h71FasRTBQVXpzpPf2mHBUPde9q0Y,1743
|
15
|
+
aiteamutils-0.2.166.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
aiteamutils-0.2.166.dist-info/RECORD,,
|
File without changes
|