Class MongoSchema

  • All Implemented Interfaces:

    public class MongoSchema
    extends AbstractSchema
    Schema mapped onto a directory of MONGO files. Each table in the schema is a MONGO file in that directory.
    • Field Detail

      • mongoDb

        final com.mongodb.client.MongoDatabase mongoDb
    • Constructor Detail

      • MongoSchema

        MongoSchema​(java.lang.String host,
                    java.lang.String database,
                    com.mongodb.MongoCredential credential,
                    com.mongodb.MongoClientOptions options)
        Creates a MongoDB schema.
        host - Mongo host, e.g. "localhost"
        credential - Optional credentials (null for none)
        options - Mongo connection options
        database - Mongo database name, e.g. "foodmart"
      • MongoSchema

        MongoSchema​(com.mongodb.client.MongoDatabase mongoDb)
        Allows tests to inject their instance of the database.
        mongoDb - existing mongo database instance