Swiftpack.co - Package - wellmart/hall

Hall

Build Status Swift 5 Version Software License Swift Package Manager compatible

The Hall provides an abstraction layer over SQLite to allow database access.

Requirements

Swift 5 and beyond.

Usage

import Hall

struct User {
    var name: String
}

func main() {
    do {
        try SQLite.default.open()
        try SQLite.default.execute("CREATE TABLE users...")
            
        let results = try SQLite.default.fetch("SELECT name,... FROM users") { statement in
            return User(name: statement[0])
        }
            
        if let results = results {
            print(results)
        }
    } catch {
        print(error)
    }
}

License

MIT

Github

link
Stars: 1

Used By

Total: 0

Releases

v0.1.0 - 2020-01-25 17:47:04

Initial release