Classes

The following classes are available globally.

  • Class defining the connection to the database.

    To setup the database, in this case using PostgreSQL:

    import SwiftKueryORM
    import SwiftKueryPostgreSQL
    let pool = PostgreSQLConnection.createPool(host: "localhost", port: 5432,
                                               options: [.databaseName("FoodDatabase")],
                                               poolOptions: ConnectionPoolOptions(
                                                                          initialCapacity: 10,
                                                                          maxCapacity: 50,
                                                                          timeout: 10000))
    Database.default = Database(pool)
    
    See more

    Declaration

    Swift

    public class Database
  • Class used to construct a Model from a row in the database

    See more

    Declaration

    Swift

    open class DatabaseDecoder
  • Class used to construct a dictionary [String: Any] from a Model

    See more

    Declaration

    Swift

    open class DatabaseEncoder
  • Class caching the tables for the models of the application

    Declaration

    Swift

    public class TableInfo