Skip to content

Commit c4b424a

Browse files
committed
feat: add tenants to async handle
1 parent 9d35d74 commit c4b424a

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/main/java/io/weaviate/client6/v1/api/collections/CollectionHandle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public CollectionHandle(
4242
private CollectionHandle(CollectionHandle<PropertiesT> c, CollectionHandleDefaults defaults) {
4343
this.config = c.config;
4444
this.aggregate = c.aggregate;
45+
this.tenants = c.tenants;
4546
this.query = new WeaviateQueryClient<>(c.query, defaults);
4647
this.data = new WeaviateDataClient<>(c.data, defaults);
47-
this.tenants = c.tenants;
4848

4949
this.defaults = defaults;
5050
}

src/main/java/io/weaviate/client6/v1/api/collections/CollectionHandleAsync.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import io.weaviate.client6.v1.api.collections.pagination.AsyncPaginator;
1212
import io.weaviate.client6.v1.api.collections.query.ConsistencyLevel;
1313
import io.weaviate.client6.v1.api.collections.query.WeaviateQueryClientAsync;
14+
import io.weaviate.client6.v1.api.collections.tenants.WeaviateTenantsClientAsync;
1415
import io.weaviate.client6.v1.internal.ObjectBuilder;
1516
import io.weaviate.client6.v1.internal.grpc.GrpcTransport;
1617
import io.weaviate.client6.v1.internal.orm.CollectionDescriptor;
@@ -21,19 +22,21 @@ public class CollectionHandleAsync<PropertiesT> {
2122
public final WeaviateDataClientAsync<PropertiesT> data;
2223
public final WeaviateQueryClientAsync<PropertiesT> query;
2324
public final WeaviateAggregateClientAsync aggregate;
25+
public final WeaviateTenantsClientAsync tenants;
2426

2527
private final CollectionHandleDefaults defaults;
2628

2729
public CollectionHandleAsync(
2830
RestTransport restTransport,
2931
GrpcTransport grpcTransport,
30-
CollectionDescriptor<PropertiesT> collectionDescriptor,
32+
CollectionDescriptor<PropertiesT> collection,
3133
CollectionHandleDefaults defaults) {
3234

33-
this.config = new WeaviateConfigClientAsync(collectionDescriptor, restTransport, grpcTransport);
34-
this.aggregate = new WeaviateAggregateClientAsync(collectionDescriptor, grpcTransport, defaults);
35-
this.query = new WeaviateQueryClientAsync<>(collectionDescriptor, grpcTransport, defaults);
36-
this.data = new WeaviateDataClientAsync<>(collectionDescriptor, restTransport, grpcTransport, defaults);
35+
this.config = new WeaviateConfigClientAsync(collection, restTransport, grpcTransport);
36+
this.aggregate = new WeaviateAggregateClientAsync(collection, grpcTransport, defaults);
37+
this.query = new WeaviateQueryClientAsync<>(collection, grpcTransport, defaults);
38+
this.data = new WeaviateDataClientAsync<>(collection, restTransport, grpcTransport, defaults);
39+
this.tenants = new WeaviateTenantsClientAsync(collection, restTransport, grpcTransport);
3740

3841
this.defaults = defaults;
3942
}
@@ -42,6 +45,7 @@ public CollectionHandleAsync(
4245
private CollectionHandleAsync(CollectionHandleAsync<PropertiesT> c, CollectionHandleDefaults defaults) {
4346
this.config = c.config;
4447
this.aggregate = c.aggregate;
48+
this.tenants = c.tenants;
4549
this.query = new WeaviateQueryClientAsync<>(c.query, defaults);
4650
this.data = new WeaviateDataClientAsync<>(c.data, defaults);
4751

0 commit comments

Comments
 (0)