mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Select from parent and related
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user