DatabaseSpecification

public struct DatabaseSpecification : Codable

A struct modeling the information returned from the listDatabases command about a single database.

  • The name of the database.

    Declaration

    Swift

    public let name: String
  • The amount of disk space consumed by this database.

    Declaration

    Swift

    public let sizeOnDisk: Int
  • Whether or not this database is empty.

    Declaration

    Swift

    public let empty: Bool
  • For sharded clusters, this field includes a document which maps each shard to the size in bytes of the database on disk on that shard. For non sharded environments, this field is nil.

    Declaration

    Swift

    public let shards: BSONDocument?