添加注册登录功能

This commit is contained in:
2025-08-29 00:34:40 +08:00
parent 09065f2ce7
commit 2fe3474d9e
3060 changed files with 29217 additions and 87137 deletions

View File

@@ -39,6 +39,7 @@ from .base import PassiveFlag
from .context import FromStatement
from .context import ORMCompileState
from .context import QueryContext
from .strategies import SelectInLoader
from .util import _none_set
from .util import state_str
from .. import exc as sa_exc
@@ -1309,15 +1310,18 @@ def _load_subclass_via_in(
if context.populate_existing:
q2 = q2.execution_options(populate_existing=True)
context.session.execute(
q2,
dict(
primary_keys=[
state.key[1][0] if zero_idx else state.key[1]
for state, load_attrs in states
]
),
).unique().scalars().all()
while states:
chunk = states[0 : SelectInLoader._chunksize]
states = states[SelectInLoader._chunksize :]
context.session.execute(
q2,
dict(
primary_keys=[
state.key[1][0] if zero_idx else state.key[1]
for state, load_attrs in chunk
]
),
).unique().scalars().all()
return do_load