Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/330.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python SQLAlchemy ResultProxy按需加载行?_Python_Sqlalchemy - Fatal编程技术网

Python SQLAlchemy ResultProxy按需加载行?

Python SQLAlchemy ResultProxy按需加载行?,python,sqlalchemy,Python,Sqlalchemy,所以我的问题是,当我使用for循环访问行时,ResultProxy按需加载结果?或者它只是一次将所有行加载到内存中 for record in result_proxy: print(record) 如果您查看中的iter方法,您可以看到它调用DBAPI方法。这应该一次从游标加载一行到内存中

所以我的问题是,当我使用for循环访问行时,
ResultProxy
按需加载结果?或者它只是一次将所有行加载到内存中

for record in result_proxy:
    print(record)

如果您查看中的iter方法,您可以看到它调用DBAPI方法。这应该一次从游标加载一行到内存中