Week 20

News

Hello Vapor-heads of the world!. The final Fluent 3 RCs were released this week and it comes with very interesting changes and improvements. Big steps towards code sharing, first tests of using Fluent ORM with the internal SQLite DB on iOS ✅

New Features

Add CaseIterable protocol for Swift 4.1

This will allow Fluent to take advantage of CaseIterable when it comes in Swift 4.2.

vapor/core#157

Fluent 1.0.0 GM + Add Decoders + SQL Updates

vapor/postgresql#72

NIO

Current version 1.8.0

Updated http_parser

Motivation:

Our copy of http_parser has become almost a year old now, and there are both some bugfixes that improve correctness and some performance improvements in http_parser that we should pick up.

Modifications:

Result:

Shiny new http_parser!

Community Contributions

Created Worker.future() method

Adds a .future() method to the Worker protocol that creates a new, succeeded, future with a Void value.

let success: Future<Void> = request.future()

vapor/core#156

Added helper method to initialize connection from connection string

let databaseURL = "mysql://username:password@hostname.com:3306/database"
let config = try MySQLDatabaseConfig(url: databaseURL)

vapor/mysql#177

Added PostgreSQLStringModel

vapor/fluent-postgresql#45

Make FluentSQLite usable on iOS

The two most popular options for persistence on iOS (Realm and Core Data), both rely heavily on Objective-C, however, SQLite is available.

Concept:

// Shared models package, imported by both client and server
class User: Codable {
  let id: Int?
  let name: String
  let age: Int
}

// Client
extension User: SQLiteModel, Migration {}

// Server
extension User: PostgresModel, Migration {}

vapor/fluent-sqlite#7

Tagged releases

Current Version 3.0.4

Articles

How to build Web Auth with Session

Brought to you by @martinlasek

How to build Web Auth with Session

Fluent Migrations: Adding/Deleting columns from a Database

Brought to you by @anapaix

Fluent Migrations: Adding/Deleting columns from a Database

Want to know more or get inspired?

Take action

There are many ways you can contribute with Vapor

Vapor communities around the world

Vapor Berlin

Vapor London

Vapor Boston

Vapor Tokyo

Writing Credits

@frivas

@twof