orientechnologies / pyorient

OrientDB driver for Python that uses the binary protocol.
Apache License 2.0
119 stars 38 forks source link

Is it possible to use cursors with this package? #15

Open aemitos opened 8 years ago

aemitos commented 8 years ago

Hi, I'm creating a storage engine to use with an infrastructure to deal with some aspects that can be understood as a big data framework in some ways. I'm evaluating pyorient as a package to access the server using the binary protocol, since we use python as a standard language for implementations. It's more a question then an issue, so, sorry for the trouble. But, the scenario is, I have a query in a cluster that returns 10 millions records as result. How I deal with this in the package? Also, considering an async approach. In mongodb motor package, there is an implementation that enables to fetch all data in a list, or use a cursor to avoid problems with large result sets. If I need this I must implement? Best regards and great work in this package, congrats André

aemitos commented 8 years ago

Ok, I'm going further with the documentation and I found a "skip" and "limit" control in the "select" statements, also the Fetch Strategies: http://orientdb.com/docs/2.0/orientdb.wiki/Tutorial-SQL.html http://orientdb.com/docs/2.0/orientdb.wiki/Fetching-Strategies.html

This answer my question for now. But, you guys as developers, do you see any meaning in my question? (Cursor feature) Thanks Best Regards André

aemitos commented 8 years ago

Thinking right now, the cursor would be good if it considers a stream because if I decide to use skips and limits I will have to execute lots of queries to get the results, right? Sorry to transform the issue into a question, and right now, I kind of discussion. Thanks in advance Regards