Merge branch '1.8.x' into update-examples

This commit is contained in:
Chirag Aggarwal 2025-09-05 20:45:50 +07:00 committed by GitHub
commit 9871e6fd6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 28 deletions

View file

@ -6769,7 +6769,7 @@ trait DatabasesBase
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'queries' => [Query::contains('lineAttr', [[1.0, 1.0]])->toString()]
'queries' => [Query::contains('lineAttr', [[1.1, 1.1]])->toString()]
]);
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertCount(1, $response['body']['documents']);
@ -7635,19 +7635,6 @@ trait DatabasesBase
]);
$this->assertEquals(202, $retriedIndex['headers']['status-code']);
// Passing orders to spatial index should not throw error(in case of mariadb)
$ordersIndex = $this->client->call(Client::METHOD_POST, '/databases/' . $databaseId . '/collections/' . $collectionId . '/indexes', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'key' => 'idx_required_point_with_orders',
'type' => Database::INDEX_SPATIAL,
'attributes' => ['pRequired'],
'orders' => ['ASC']
]);
$this->assertEquals(202, $ordersIndex['headers']['status-code']);
// Cleanup
$this->client->call(Client::METHOD_DELETE, '/databases/' . $databaseId . '/collections/' . $collectionId, array_merge([
'content-type' => 'application/json',

View file

@ -8230,7 +8230,7 @@ trait DatabasesBase
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'queries' => [Query::contains('lineAttr', [[1.0, 1.0]])->toString()]
'queries' => [Query::contains('lineAttr', [[1.1, 1.1]])->toString()]
]);
$this->assertEquals(200, $response['headers']['status-code']);
$this->assertCount(1, $response['body']['rows']);
@ -8562,19 +8562,6 @@ trait DatabasesBase
]);
$this->assertEquals(202, $retriedIndex['headers']['status-code']);
// Passing orders to spatial index should not throw error (in case of mariadb)
$ordersIndex = $this->client->call(Client::METHOD_POST, '/tablesdb/' . $databaseId . '/tables/' . $tableId . '/indexes', array_merge([
'content-type' => 'application/json',
'x-appwrite-project' => $this->getProject()['$id'],
'x-appwrite-key' => $this->getProject()['apiKey']
]), [
'key' => 'idx_required_point_with_orders',
'type' => Database::INDEX_SPATIAL,
'columns' => ['pRequired'],
'orders' => ['ASC']
]);
$this->assertEquals(202, $ordersIndex['headers']['status-code']);
// Cleanup
$this->client->call(Client::METHOD_DELETE, '/tablesdb/' . $databaseId . '/tables/' . $tableId, array_merge([
'content-type' => 'application/json',