mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Select from parent and related
This commit is contained in:
parent
3a7d00519f
commit
e62e5c405a
1 changed files with 5 additions and 2 deletions
|
|
@ -361,11 +361,14 @@ trait DatabasesBase
|
|||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
], $this->getHeaders()), [
|
||||
'queries' => ['equal("library", "library1")', 'select(["library.*"])'],
|
||||
'queries' => [
|
||||
'equal("library", "library1")',
|
||||
'select(["fullName","library.*"])']
|
||||
]);
|
||||
|
||||
$this->assertEquals(1, $documents['body']['total']);
|
||||
$this->assertEquals('Library 1', $documents['body']['documents'][0]['library']['libraryName']);
|
||||
$this->assertArrayHasKey('fullName', $documents['body']['documents'][0]);
|
||||
|
||||
$documents = $this->client->call(Client::METHOD_GET, '/databases/' . $databaseId . '/collections/' . $person['body']['$id'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
|
@ -523,7 +526,7 @@ trait DatabasesBase
|
|||
/**
|
||||
* @depends testRelations
|
||||
*/
|
||||
public function testQueries(array $data): void
|
||||
public function testValidateOperators(array $data): void
|
||||
{
|
||||
$response = $this->client->call(Client::METHOD_GET, '/databases/' . $data['databaseId'] . '/collections/' . $data['personCollection'] . '/documents', array_merge([
|
||||
'content-type' => 'application/json',
|
||||
|
|
|
|||
Loading…
Reference in a new issue