pythononwheels / pow_devel

development repo for PyhtonOnWheels framework
www.pythononwheels.org
MIT License
75 stars 10 forks source link

Make result_to_object return a generator #22

Closed pythononwheels closed 6 years ago

pythononwheels commented 7 years ago

method very slow compared to db result while converting large resultsets to objects.

pythononwheels commented 7 years ago

so result_to_object should return a generator function

def res(): .... yield

code:

res= Model.find_all() # same as Model.find()

object = next(res)

pythononwheels commented 7 years ago

Done for MongoDB Models.

pythononwheels commented 7 years ago

Unneccessary for All SQL (returning a cursor)

pythononwheels commented 6 years ago

started for tinyDB

pythononwheels commented 6 years ago

Done