Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
75 views
in Technique[技术] by (71.8m points)

python - How to convert a list of Class Objects into a SQLAlchemy BaseQuery object

I had face a problem where I have to use the following code

list_of_class_object = Class.query.filter_by().all();

I wonder after some changes made to this list i.e. combining it with another list or removing elements from this list is it possible to convert such list into a BaseQuery object? I tried the .join method but doesn't seems to work. I need to do such because I need to:

list_of_class_object --> BaseQuery object --> BaseQuery object.paginate(args = args, args).

This thing had been troubling thing for a long time and couldn't find any solution! Any help would be so much appreciated! And Thanks in Advance!

question from:https://stackoverflow.com/questions/65713276/how-to-convert-a-list-of-class-objects-into-a-sqlalchemy-basequery-object

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...