Class MongoDatabase

java.lang.Object
com.codename1.backend.mongo.MongoDatabase

public final class MongoDatabase extends Object
One database of a MongoClient.
  • Method Details

    • getName

      public String getName()
      The database's name.
    • collection

      public MongoCollection collection(String collection)
      A collection by name; nothing is sent until it is used.
    • runCommand

      public Map runCommand(Map command) throws IOException
      Runs a command against this database and returns the reply.
      Throws:
      IOException
    • drop

      public void drop() throws IOException
      Drops the whole database.
      Throws:
      IOException