bestchange_source bs
join bestchange_source_statistic bss
on bs.id = bss.id
and bs.processing_status = 'UNPROCESSED'
order by bss.collection_duration deschttps://dpaste.org/oGAP
python
bs = BestchangeSource.__table__.alias()
bss = BestchangeSourceStatistic.__table__.alias()
select_fields_list = [
bs.c.id,
bs.c.xml_url,
bs.c.rules
]
filter_stmt = and_(
bs.c.id == bss.c.id,
bs.c.processing_status == ProcessingStatus.UNPROCESSED
)
stmt = select(*select_fields_list).select_from(
bs.join(bss, filter_stmt)).order_by(bss.c.updated_at)https://dpaste.org/4PPQ
Получаю sqlalchemy.exc.ArgumentError: FROM expression expected
ЧТЯДНТ!?
select(*select_fields_list) -> select(select_fields_list) Невнимательность - это плохо, пнятненько?
Обсуждают сегодня