Swiftpack.co - Package - wellmart/hallkit

HallKit

Build Status Swift 5 Version Software License Swift Package Manager compatible

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

Requirements

Swift 5 and beyond.

Usage

import HallKit

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: 0

Dependencies

Used By

Total: 0

Releases

v0.1.0 - 2019-10-17 04:17:11

Initial release