constructor(config) {
    super();

    /**
     * Collection used to store the recordings
     *
     * @private
     */
    this.RECORDING_COLLECTION = 'recordings';
    /**
     * Collection used to store the tracker data
     *
     * @private
     */
    this.TRACKER_COLLECTION = 'tracker';
    /**
     * Collection used to store the counter entries
     *
     * @private
     */
    this.COUNTER_COLLECTION = 'counter';
    /**
     * Collection to store App Settings
     *
     * @private
     */
    this.APP_COLLECTION = 'app';
    /**
     * Name of the Database
     *
     * @private
     */
    this.DATABASE_NAME = 'opendatacam';

    /**
     * Store the configuration
     */
    this.config = {
      persistTracker: false,
    };

    // Override default config
    if (config) {
      Object.keys(config).forEach((key) => {
        this.config[key] = config[key];
      });
    }

    /**
     * The connection string used or null if a Db object was used for the connection or the
     * connection has not been established yet.
     */
    this.connectionString = null;
    this.db = null;
  }
Creates a new MongoDbManager object

The `code` is an object with the following fields

- url (string): The URL of the Mongo Server as a string
- client (MongoClient): If a Mongo client already exists the object can be passed here
- persistTracker (bool): Store raw tracker information. Default, false

After creation {@link MongoDbManager.connect} must be called.

In case of connection loss, the MongoDbManager will try to automatically reconnect. However any
operations that should have been carried out while MongoDbManager was offline will be rejected.
It is up to the caller to retry failed operations. In practice this meas that tracker data
will be lost, while counter data should recover as Opendatacam always updates the whole counter
state.

@param {*} config The MongoClient to use or credentials to create one