Examples for the Lighter SQLite environment, SwiftUI and server side.
Note: The examples require Swift 5.7 / Xcode 14b for proper plugin support.
When embedding a package using Enlighter (like NorthwindSQLite.swift), a local package seems to be required w/ the Xcode 14 beta (3...5). Otherwise the Swift package plugins do not seem to run. In the example project this is the "AppLogic" package. If Xcode gets stuck or doesn't run the plugin, a package update sometimes help.
The Northwind database is a common database example that has been ported to SQLite. Lighter provides a Swift version of that in the NorthwindSQLite.swift repository.
Note: The particular SQLite version of the Northwind database is quite lacking. For example booleans are stored as TEXTs, many columns are inappropriately marked as
NULL
able.
That actually makes it a good example on how to deal with such databases in Lighter.
The Swift Northwind API: Documentation.
This example pulls in a lot of bigger dependencies. A real Lighter project can actually work w/ no external dependencies at all.
Lighter is brought to you by Helge HeΓ / ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.
Want to support my work? Buy an app: Code for SQLite3, Past for iChat, SVG Shaper, Shrugs, HMScriptEditor. You don't have to use it! π
link |
Stars: 7 |
Last commit: 8 weeks ago |
Code adjusted for Swift 5.9.
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics