0
什麼會更有效率或方便?直接查詢迭代VS獲取()或有趣()和迭代
1.- fetch()然後遍歷:
query = MyEntity.all()
list = query.run()
for x in list:
# do something...
2:run(),然後遍歷:
query = MyEntity.all()
list = query.run()
for x in list:
# do something...
3.-直接迭代查詢:
query = MyEntity.all()
for x in query:
# do something...