mogui/pyorient

why database returns only 20 values

Closed this issue · 4 comments

i just doing a query in a database that have 58 registers but when i connect and do


query1 = "select * from "+vertice
for i in client.query(query1):
    print i

it returns only 20! ??

Using Studio version : 2.1
OrientDB version : 2.1.14

and last version of pyorient

You're right, this needs to be fixed :) When I initially implemented it,
not providing a limit caused the query to hang, but I'm sure there must be
a better approach.

On Fri, Apr 8, 2016 at 3:30 PM, el3ctron notifications@github.com wrote:

i just doing a query in a database that have 58 registers but when i
connect and do

query1 = "select * from "+vertice
for i in client.query(query1):
print i

it returns only 20! ??

Using Studio version : 2.1
OrientDB version : 2.1.14

and last version of pyorient


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#180

ok i find a solution changing

for i in client.query(query1):

by

for i in client.command(query1):

now my query is working

Try:

client.query(query1, 200) # 200 = LIMIT 200

Hi @el3ctron , i know it should be better explained, but refer to this:
https://github.com/mogui/pyorient#make-a-query

The first number is the limit in the query, te latter one is the fetchPlan and you can refer to this:
http://orientdb.com/docs/2.1/Fetching-Strategies.html#format-for-fetch-plans