Classes

The following classes are available globally.

  • Represents a single MongoDB collection.

    ### Definition ###

    A grouping of MongoDB documents. A collection is the equivalent of an RDBMS table. A collection exists within a single database. Collections do not enforce a schema. Documents within a collection can have different fields. Typically, all documents in a collection have a similar or related purpose. See Namespaces.

    See more

    Declaration

    Swift

    public final class Collection: CollectionQueryable
  • A subset of data in Collection

    See more

    Declaration

    Swift

    public class CollectionSlice<Element> : CollectionQueryable, Sequence, IteratorProtocol
  • A Mongo Database. Cannot be publically initialized. But you can get a database object by subscripting Server with a String as the database name

    See more

    Declaration

    Swift

    public final class Database
  • A Cursor is a pointer to a sequence/collection of Documents on the MongoDB server.

    It can be looped over using a for let document in cursor loop like any other sequence.

    It can be transformed into an array with Array(cursor) and allows transformation to another type.

    See more

    Declaration

    Swift

    public final class Cursor<T>
  • A server object is the core of MongoKitten as it’s used to communicate to the server. You can select a Database by subscripting an instance of this Server with a String.

    See more

    Declaration

    Swift

    public final class Server