lukevanin/swiftql
SwiftQL lets you you write SQL queries using familiar Swift type-safe syntax.
Overview
Using SwiftQL SQL expressions look like Swift code:
let query = sql { schema in
let person = schema.table(Person.self)
Select(person)
From(person)
Where(person.name == 'Fred')
}SQL written with SwiftQL is type checked at compile time, highlghting any syntax errors, typos, or missing fields.
SwiftQL lets you use your IDE's code completion and refactoring tools to assist you in writing error free SQL.
SwiftQL uses SQLite's dialect of SQL. If you have written SQL for SQLite you already know SwiftQL.
See the documentation for more.
Installation
Swift Package Manager
Add the following line to the dependencies section in your Package.swift file:
.package(url: "https://github.com/lukevanin/swiftql.git", from: "1.0.0")Xcode
Refer to Apple's documentation Adding package dependencies to your app, and specify the package URL https://github.com/lukevanin/swiftql.git.
License
MIT license. See the license.
Package Metadata
Repository: lukevanin/swiftql
Default branch: main
README: README.md