How should use the scala driver?

hello there, i am new to scala and trying to make examples in the driver page work. but i cant seem to do very basic things like printing results from a query .
this is my code and it doesnt print anything to the screen.
is there a tutorial that can bring me up to the speed ?

  val mongoClient: MongoClient = MongoClient()
  val database: MongoDatabase = mongoClient.getDatabase("db")
  val collection: MongoCollection[Document] = database.getCollection("small")
  var observable: FindObservable[Document] = collection.find();
  observable.subscribe(new Observer[Document] {
    override def onNext(result: Document): Unit = println(result.toJson())

    override def onError(e: Throwable): Unit = println("Failed: " + e.getMessage)

    override def onComplete(): Unit = println("Completed")

Hi @Ali_ihsan_Erdem1 welcome to the community!

Does this page: MongoDB Scala Driver Quick Start help?

Best regards

1 Like

no it doesnt i couldnt make that examples work