Package 

Class MongosKt

    • Method Summary

      Modifier and Type Method Description
      final MongoDatabase getDatabase(String databaseNameProperty) Return the sync database specified in the databaseNameProperty.
      final MongoDatabase getAsyncDatabase(String databaseNameProperty) Return the async database specified in the databaseNameProperty.
      final <T extends Any> Unit watch(MongoCollection<T> $self, FullDocument fullDocument, Function1<ChangeStreamDocument<T>, Unit> listener)
      final <T extends Any> String ensureIndex(MongoCollection<T> $self, KProperty<?> properties, IndexOptions indexOptions)
      final <T extends Any> String ensureIndex(MongoCollection<T> $self, Bson keys, IndexOptions indexOptions)
      final <T extends Any> String ensureIndex(MongoCollection<T> $self, String keys, IndexOptions indexOptions)
      final <T extends Any> String ensureUniqueIndex(MongoCollection<T> $self, KProperty<?> properties, IndexOptions indexOptions)
      final Boolean isDocumentDB()
      final Boolean pingMongoDatabase(String databaseName)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDatabase

         final MongoDatabase getDatabase(String databaseNameProperty)

        Return the sync database specified in the databaseNameProperty. if the env or system property is not found, use the databaseNameProperty as database name (remove "_mongo_db" string is present).

      • getAsyncDatabase

         final MongoDatabase getAsyncDatabase(String databaseNameProperty)

        Return the async database specified in the databaseNameProperty. if the env or system property is not found, use the databaseNameProperty as database name (remove "_mongo_db" string is present).

      • watch

         final <T extends Any> Unit watch(MongoCollection<T> $self, FullDocument fullDocument, Function1<ChangeStreamDocument<T>, Unit> listener)
      • ensureIndex

         final <T extends Any> String ensureIndex(MongoCollection<T> $self, Bson keys, IndexOptions indexOptions)