Ostico / PhpOrient

PhpOrient - Official Php driver based on the binary protocol of OrientDB.
Other
68 stars 37 forks source link

Bypass default limit 20 records #4

Closed Stephanevincenza closed 9 years ago

Stephanevincenza commented 9 years ago

If I try $response=$client->query('select from Membres limit 4'); Works fine, There's only 4 records in the response But $response=$client->query('select from Membres limit 29'); it's impossible to obtain more than 20 records in the response. And it doesn't work to use $client->command('set limit -1'); the 'set limit -1' works fine in the binary console to bypass the defeult 20 records limit. Best regards

aurelijusb commented 9 years ago

query function have limit paramer. Try

$client->query('select from Membres', 29);

Source: https://github.com/Ostico/PhpOrient/blob/v1.1.1/src/PhpOrient/PhpOrient.php#L280

Ostico commented 9 years ago

Yeah, with this work around it works, but this is a bug.

Ostico commented 9 years ago
        $response = $this->client->query( 'select from V limit 4' );
        $this->assertCount( 4, $response );
        $response = $this->client->query( 'select from V limit 29' );
        $this->assertCount( 29, $response );

        $response = $this->client->query( 'select from V limit 4', 40 );
        $this->assertCount( 4, $response );
        $response = $this->client->query( 'select from V limit 29', 40 );
        $this->assertCount( 29, $response );

        $response = $this->client->query( 'select from V', 40 );
        $this->assertCount( 40, $response );

        $response = $this->client->query( 'select from V' );
        $this->assertCount( 20, $response );