CollectionMetadata

public struct CollectionMetadata : Codable

A structure representing metadata for a collection in the database.

This metadata includes the collection’s name, the indexes associated with it, and the partition key used for organizing the data.

  • Properties:
  • name: The name of the collection.
  • indexes: An array of strings representing the indexes defined for the collection.
  • partitionKey: The key used to partition the data within the collection.
  • Undocumented

    Declaration

    Swift

    public let name: String
  • Undocumented

    Declaration

    Swift

    public let indexes: [String]
  • Undocumented

    Declaration

    Swift

    public let partitionKey: String
  • Initializes a new instance of DocumentCollection.

    Declaration

    Swift

    public init(name: String, indexes: [String] = [], partitionKey: String)

    Parameters

    name

    The name of the collection.

    indexes

    An optional array of index names to be used in the collection. Defaults to an empty array.

    partitionKey

    The key used to partition the collection.