Skip to content

Commit 766ad1a

Browse files
committed
Implement Pinecone managed store and update ManagedStoreInterface::drop()
1 parent ceb360e commit 766ad1a

File tree

20 files changed

+121
-66
lines changed

20 files changed

+121
-66
lines changed

src/store/src/Bridge/Cache/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function query(Vector $vector, array $options = []): iterable
9191
yield from $this->distanceCalculator->calculate($vectorDocuments, $vector, $options['maxItems'] ?? null);
9292
}
9393

94-
public function drop(): void
94+
public function drop(array $options = []): void
9595
{
9696
$this->cache->clear();
9797
}

src/store/src/Bridge/ClickHouse/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function setup(array $options = []): void
4848
$this->execute('POST', $sql);
4949
}
5050

51-
public function drop(): void
51+
public function drop(array $options = []): void
5252
{
5353
$this->execute('POST', 'DROP TABLE IF EXISTS {{ table }}');
5454
}

src/store/src/Bridge/Cloudflare/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function setup(array $options = []): void
5252
]);
5353
}
5454

55-
public function drop(): void
55+
public function drop(array $options = []): void
5656
{
5757
$this->request('DELETE', \sprintf('vectorize/v2/indexes/%s', $this->index));
5858
}

src/store/src/Bridge/ManticoreSearch/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function setup(array $options = []): void
5050
));
5151
}
5252

53-
public function drop(): void
53+
public function drop(array $options = []): void
5454
{
5555
$this->request('cli', \sprintf('DROP TABLE %s', $this->table));
5656
}

src/store/src/Bridge/MariaDb/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function setup(array $options = []): void
7676
);
7777
}
7878

79-
public function drop(): void
79+
public function drop(array $options = []): void
8080
{
8181
$this->connection->exec(\sprintf('DROP TABLE IF EXISTS %s', $this->tableName));
8282
}

src/store/src/Bridge/Meilisearch/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function query(Vector $vector, array $options = []): iterable
101101
}
102102
}
103103

104-
public function drop(): void
104+
public function drop(array $options = []): void
105105
{
106106
$this->request('DELETE', \sprintf('indexes/%s', $this->indexName), []);
107107
}

src/store/src/Bridge/Milvus/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function query(Vector $vector, array $options = []): iterable
122122
}
123123
}
124124

125-
public function drop(): void
125+
public function drop(array $options = []): void
126126
{
127127
$this->request('POST', 'v2/vectordb/databases/drop', [
128128
'dbName' => $this->database,

src/store/src/Bridge/MongoDb/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function setup(array $options = []): void
9999
}
100100
}
101101

102-
public function drop(): void
102+
public function drop(array $options = []): void
103103
{
104104
$this->getCollection()->drop();
105105
}

src/store/src/Bridge/Neo4j/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function query(Vector $vector, array $options = []): iterable
7979
}
8080
}
8181

82-
public function drop(): void
82+
public function drop(array $options = []): void
8383
{
8484
$this->request('POST', \sprintf('db/%s/query/v2', $this->databaseName), [
8585
'statement' => 'MATCH (n) DETACH DELETE n',

src/store/src/Bridge/OpenSearch/Store.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function setup(array $options = []): void
6060
]);
6161
}
6262

63-
public function drop(): void
63+
public function drop(array $options = []): void
6464
{
6565
$indexExistResponse = $this->httpClient->request('HEAD', \sprintf('%s/%s', $this->endpoint, $this->indexName));
6666

0 commit comments

Comments
 (0)