Skip to content

Commit

Permalink
Fix SyncMongoCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
jyemin committed Apr 18, 2022
1 parent 5fee4af commit 6243c36
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public <TResult> ChangeStreamIterable<TResult> watch(final Class<TResult> result

@Override
public ChangeStreamIterable<T> watch(final List<? extends Bson> pipeline) {
return new SyncChangeStreamIterable<>(wrapped.watch(wrapped.getDocumentClass()));
return new SyncChangeStreamIterable<>(wrapped.watch(pipeline, wrapped.getDocumentClass()));
}

@Override
Expand Down Expand Up @@ -737,44 +737,44 @@ public void dropIndex(final ClientSession clientSession, final Bson keys, final

@Override
public void dropIndexes() {
throw new UnsupportedOperationException();
Mono.from(wrapped.dropIndexes()).block(TIMEOUT_DURATION);
}

@Override
public void dropIndexes(final ClientSession clientSession) {
throw new UnsupportedOperationException();
Mono.from(wrapped.dropIndexes(unwrap(clientSession))).block(TIMEOUT_DURATION);
}

@Override
public void dropIndexes(final DropIndexOptions dropIndexOptions) {
throw new UnsupportedOperationException();
Mono.from(wrapped.dropIndexes(dropIndexOptions)).block(TIMEOUT_DURATION);
}

@Override
public void dropIndexes(final ClientSession clientSession, final DropIndexOptions dropIndexOptions) {
throw new UnsupportedOperationException();
Mono.from(wrapped.dropIndexes(unwrap(clientSession), dropIndexOptions)).block(TIMEOUT_DURATION);
}

@Override
public void renameCollection(final MongoNamespace newCollectionNamespace) {
throw new UnsupportedOperationException();
Mono.from(wrapped.renameCollection(newCollectionNamespace)).block(TIMEOUT_DURATION);
}

@Override
public void renameCollection(final MongoNamespace newCollectionNamespace, final RenameCollectionOptions renameCollectionOptions) {
throw new UnsupportedOperationException();
Mono.from(wrapped.renameCollection(newCollectionNamespace, renameCollectionOptions)).block(TIMEOUT_DURATION);
}

@Override
public void renameCollection(final ClientSession clientSession, final MongoNamespace newCollectionNamespace) {
throw new UnsupportedOperationException();
Mono.from(wrapped.renameCollection(unwrap(clientSession), newCollectionNamespace)).block(TIMEOUT_DURATION);
}

@Override
public void renameCollection(
final ClientSession clientSession, final MongoNamespace newCollectionNamespace,
final RenameCollectionOptions renameCollectionOptions) {
throw new UnsupportedOperationException();
Mono.from(wrapped.renameCollection(unwrap(clientSession), newCollectionNamespace, renameCollectionOptions)).block(TIMEOUT_DURATION);
}

private com.mongodb.reactivestreams.client.ClientSession unwrap(final ClientSession clientSession) {
Expand Down

0 comments on commit 6243c36

Please sign in to comment.