mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Add internalId
This commit is contained in:
parent
0648de2046
commit
e11e7e6780
2 changed files with 8 additions and 2 deletions
|
|
@ -71,12 +71,18 @@ class Base extends Queries
|
|||
'array' => false,
|
||||
]);
|
||||
|
||||
$internalId = new Document([
|
||||
'key' => '$internalId',
|
||||
'type' => Database::VAR_STRING,
|
||||
'array' => false,
|
||||
]);
|
||||
|
||||
$validators = [
|
||||
new Limit(),
|
||||
new Offset(),
|
||||
new Cursor(),
|
||||
new Filter($attributes, APP_DATABASE_QUERY_MAX_VALUES),
|
||||
new Order($attributes),
|
||||
new Order(array_merge($attributes, [$internalId])),
|
||||
];
|
||||
|
||||
parent::__construct($validators);
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class DatabasesCustomServerTest extends Scope
|
|||
Query::orderDesc()->setAttribute('')->toString(),
|
||||
],
|
||||
]);
|
||||
|
||||
var_dump($databases);
|
||||
$this->assertEquals(2, $databases['body']['total']);
|
||||
$this->assertEquals($base[0]['$id'], $databases['body']['databases'][0]['$id']);
|
||||
$this->assertEquals($base[1]['$id'], $databases['body']['databases'][1]['$id']);
|
||||
|
|
|
|||
Loading…
Reference in a new issue