Skip to content

Latest commit

 

History

History
73 lines (43 loc) · 2.37 KB

README.md

File metadata and controls

73 lines (43 loc) · 2.37 KB

PostgresModelFactory

A library to access PostgreSQL database by codable models.

Built for Platform

Built with swift xcode SPM

Usage

Define a model class for a database table

Data access layer

  1. Abstract CRUD interfact (optional)
  1. CRUD and Version migration

Sample

Installation

Swift Package Manager

Specify dependency in Package.swift by adding this:

.package(url: "https://github.com/kelvinjjwong/PostgresModelFactory.git", .upToNextMajor(from: "1.0.13"))

In targets section, add PostgresModelFactory to dependencies list:

    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "MyApp",
            dependencies: ["PostgresClientKit", "AnotherLibrary"]),
    ],

Then run swift build to download and integrate the package.

CocoaPods

Use CocoaPods to install PostgresModelFactory by adding it to Podfile:

pod 'PostgresModelFactory', '~> 1.0.13'

Then run pod install to download and integrate the package.

Dependency

License

The MIT License