connect(to:logger:)

    Connect to the database with the given settings. You can also use connect(_:on:) to connect by using a connection string.

    MongoDatabase.swift:148
    static func connect(to settings: ConnectionSettings, logger: Logger = Logger(label: "org.orlandos-nl.mongokitten")) async throws -> MongoDatabase

    Parameters

    settings

    The connection settings, which must include a database name

    Will postpone queries until initial discovery is complete. Since the cluster is lazily initialized, you’ll only know of a failure in connecting (such as wrong credentials) during queries

    Other members in extension

    Type members

    Instance members