Swift ORM: "StORM"

StORM is a modular ORM for Swift, layered on top of Perfect.

It aims to be easy to use, but flexible, and maintain consistency between datasource implementations for the user: you, the developer. It tries to allow you to write great code without worrying about the details of how to interact with the database.

Relevant Examples

PostgresSQL

MySQL:

CouchDB:

MongoDB:

SQLite

StORM Documentation topics

Setting up a class: How to create a class that inherits all the StORM functionality.

Saving, Retrieving and Deleting Rows: Basic database operations

StORMCursor: Managing found sets for result set pagination.

Inserting rows: More detailed access to inserting rows.

Updating rows: More detailed access to the update process.

Lifecycle events: Details and examples of the global StORM lifecycle events.

Datasource specific documentation for StORM

Including in your project

When including the dependency in your project's Package.swift dependencies, you will have access to all nested dependencies including the database connector.

To include PostgresStORM:

.Package(url: "https://github.com/SwiftORM/Postgres-StORM.git", majorVersion: 3)

To include MySQLStORM:

.Package(url: "https://github.com/SwiftORM/MySQL-StORM.git", majorVersion: 3)

To include SQLiteStORM:

.Package(url: "https://github.com/SwiftORM/SQLite-StORM.git", majorVersion: 3)

To include CouchDBStORM:

.Package(url: "https://github.com/SwiftORM/CouchDB-StORM.git", majorVersion: 3)

To include MongoDBStORM:

.Package(url: "https://github.com/SwiftORM/MongoDB-StORM.git", majorVersion: 3)

Remember: after you change your Package.swift file, you need to regenerate your Xcode Project file using:

swift package generate-xcodeproj