Skip to content

A library to access PostgreSQL database by codable models.

License

Notifications You must be signed in to change notification settings

kelvinjjwong/PostgresModelFactory

Repository files navigation

PostgresModelFactory

A library to access PostgreSQL database by codable models.

Built for Platform

Built with swift xcode SPM

Usage and Demo

Define a model class for a database table

Data access layer

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

Sample usage

Installation

Swift Package Manager

Specify dependency in Package.swift by adding this:

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

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.4'

Then run pod install to download and integrate the package.

Dependency

License

The MIT License

About

A library to access PostgreSQL database by codable models.

Resources

License

Stars

Watchers

Forks

Packages

No packages published