diff --git a/README.md b/README.md index 0b570a6..3c43eae 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ needed. The Lighter code generator can also generate API comments for the database types. -Example: [Northwind Database](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/employee). +Example: [Northwind Database](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/employee). diff --git a/Sources/Lighter/Lighter.docc/GettingStarted.md b/Sources/Lighter/Lighter.docc/GettingStarted.md index a829d54..8483266 100644 --- a/Sources/Lighter/Lighter.docc/GettingStarted.md +++ b/Sources/Lighter/Lighter.docc/GettingStarted.md @@ -24,7 +24,7 @@ Five quick steps: make sure it is copied into the project (i.e. not a reference to some outside file). Don't have one handy? The - [Northwind](https://github.com/Lighter-swift/NorthwindSQLite.swift) + [Northwind](https://github.com/Northwind-swift/NorthwindSQLite.swift) database is a nice one to play with: [download here](https://github.com/Lighter-swift/NorthwindSQLite.swift/blob/develop/dist/northwind.db). **Make sure it is** selected as **a resource** of the Xcode target. diff --git a/Sources/Lighter/Lighter.docc/Lighter.md b/Sources/Lighter/Lighter.docc/Lighter.md index 3bbd093..7b88d9d 100644 --- a/Sources/Lighter/Lighter.docc/Lighter.md +++ b/Sources/Lighter/Lighter.docc/Lighter.md @@ -58,7 +58,7 @@ let product = try await db.products.find(42) let orders = try await db.orders.fetch(for: product) ``` If desired, it generates beautiful DocC documentation within the generated code -([Example](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/employee)). +([Example](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/employee)). ## Lighter Toolkit Components @@ -83,10 +83,10 @@ There are two associated repositories: - [Examples](https://github.com/Lighter-swift/Examples/): Contains examples on how to use the toolset, including a few SwiftUI applications and even a server side API. -- [NorthwindSQLite.swift](https://github.com/Lighter-swift/NorthwindSQLite.swift): +- [NorthwindSQLite.swift](https://github.com/Northwind-swift/NorthwindSQLite.swift): A version of the Microsoft Access 2000 Northwind sample database, re-engineered for SQLite3, and packaged up as a Swift package - ([DocC Documentation](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/))! + ([DocC Documentation](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/))! ## Topics diff --git a/Sources/Lighter/Lighter.docc/LighterAPI.md b/Sources/Lighter/Lighter.docc/LighterAPI.md index 1f43613..3cbb077 100644 --- a/Sources/Lighter/Lighter.docc/LighterAPI.md +++ b/Sources/Lighter/Lighter.docc/LighterAPI.md @@ -22,10 +22,10 @@ dependency free code for a database: . The code generators generate one Swift structure representing the Database itself (e.g. -[Northwind](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/northwind)) +[Northwind](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/northwind)) and one Swift structure for each SQL table or view (e.g. -[Product](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product)). +[Product](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product)). If the database is embedded into the app or library (as a resource file), it can be directly used like this: @@ -96,17 +96,17 @@ async let category = database.categories.find(for: product) The code generators generate one Swift structure representing the Database itself (e.g. -[Northwind](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/northwind)) +[Northwind](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/northwind)) and one Swift structure for each SQL table or view (e.g. -[Product](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product)). +[Product](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product)). ### Database Structure The name of the structure is derived from the database file name. E.g. if it is called "northwind.db", the default name mapping produces a structure with the name -"[Northwind](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/northwind)". +"[Northwind](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/northwind)". Depending on the , the database structure conforms to e.g.: - ``SQLDatabase``: This handles opening the database etc. @@ -320,7 +320,7 @@ ORDER BY City, CompanyName ``` Northwind comes with a set of example views, e.g. -[CustomerAndSuppliersByCity](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/customerandsuppliersbycity). +[CustomerAndSuppliersByCity](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/customerandsuppliersbycity). ## Topics diff --git a/Sources/Lighter/Lighter.docc/Linux.md b/Sources/Lighter/Lighter.docc/Linux.md index f3610cc..903633b 100644 --- a/Sources/Lighter/Lighter.docc/Linux.md +++ b/Sources/Lighter/Lighter.docc/Linux.md @@ -30,7 +30,7 @@ Example server: ```swift #!/usr/bin/swift sh import MacroExpress // @Macro-swift -import Northwind // @Lighter-swift/NorthwindSQLite.swift +import Northwind // @Northwind-swift/NorthwindSQLite.swift let db = Northwind.module! let app = express() @@ -57,7 +57,7 @@ var package = Package( dependencies: [ .package(url: "https://Lighter-swift/Lighter.git", from: "1.0.2"), - .package(url: "https://Lighter-swift/NorthwindSQLite.swift.git", + .package(url: "https://Northwind-swift/NorthwindSQLite.swift.git", from: "1.0.0"), .package(url: "https://github.com/Macro-swift/MacroExpress.git", from: "1.0.2") diff --git a/Sources/Lighter/Lighter.docc/Mapping.md b/Sources/Lighter/Lighter.docc/Mapping.md index 8e98a09..d855327 100644 --- a/Sources/Lighter/Lighter.docc/Mapping.md +++ b/Sources/Lighter/Lighter.docc/Mapping.md @@ -114,7 +114,7 @@ Those are the things required during column mapping both ways. There are various options on where to place more general mapping code. Let's assume the record structure mapped for the Northwind -[Product Category](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/category) +[Product Category](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/category) table. It looks like this: ```swift public struct Category : Identifiable, Codable { diff --git a/Sources/Lighter/Lighter.docc/Northwind.md b/Sources/Lighter/Lighter.docc/Northwind.md index b884609..d7de89e 100644 --- a/Sources/Lighter/Lighter.docc/Northwind.md +++ b/Sources/Lighter/Lighter.docc/Northwind.md @@ -7,7 +7,7 @@ Using the Northwind example database. 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](https://github.com/Lighter-swift/NorthwindSQLite.swift) +[NorthwindSQLite.swift](https://github.com/Northwind-swift/NorthwindSQLite.swift) repository. > Note: The particular SQLite version of the Northwind database is quite @@ -16,11 +16,11 @@ repository. > That actually makes it a good example on how to deal with such databases in > Lighter. -The Swift Northwind API: [Documentation](https://Lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/). +The Swift Northwind API: [Documentation](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/). ## Demos -Examples based on the [Northwind](https://Lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/) Database: +Examples based on the [Northwind](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/) Database: - [NorthwindWebAPI](https://github.com/Lighter-swift/Examples/tree/develop/Sources/NorthwindWebAPI/) (A server side Swift example @@ -34,7 +34,7 @@ Examples based on the [Northwind](https://Lighter-swift.github.io/NorthwindSQLit ## Getting Started -Add the `https://Lighter-swift.github.io/NorthwindSQLite.swift` as a package +Add the `https://Northwind-swift.github.io/NorthwindSQLite.swift` as a package dependency to a Swift Package Manager package. Then just import `Northwind` and run queries against the database: diff --git a/Sources/Lighter/Lighter.docc/SQLiteAPI.md b/Sources/Lighter/Lighter.docc/SQLiteAPI.md index 1e5e9ad..ce4646f 100644 --- a/Sources/Lighter/Lighter.docc/SQLiteAPI.md +++ b/Sources/Lighter/Lighter.docc/SQLiteAPI.md @@ -250,7 +250,7 @@ ORDER BY City, CompanyName ``` Northwind comes with a set of example views, e.g. -[CustomerAndSuppliersByCity](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/customerandsuppliersbycity). +[CustomerAndSuppliersByCity](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/customerandsuppliersbycity). ### Advanced SQLite API @@ -403,11 +403,11 @@ It has a slight overhead over just extracting the values directly and the default values need to be applied). An example just selecting the -[`id`](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/id-7350h/), +[`id`](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/id-7350h/), the -[`name`](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/productname/) +[`name`](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/productname/) and the -[`quantityPerUnit`](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/quantityperunit/): +[`quantityPerUnit`](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/quantityperunit/): ```swift sqlite3_prepare_v2( db, @@ -441,7 +441,7 @@ CREATE TABLE Products ( ); ``` The `product` value would contain `nil` for the -[`categoryId`](https://lighter-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/categoryid) +[`categoryId`](https://Northwind-swift.github.io/NorthwindSQLite.swift/documentation/northwind/product/categoryid) property (because it is optional) and `0` for the `discontinued` property (because that is the specified table default value). diff --git a/Tests/NorthwindTests/NorthwindTests.swift b/Tests/NorthwindTests/NorthwindTests.swift index 4e596fa..5989afc 100644 --- a/Tests/NorthwindTests/NorthwindTests.swift +++ b/Tests/NorthwindTests/NorthwindTests.swift @@ -11,7 +11,7 @@ import Foundation final class NorthwindTests: XCTestCase { let url = URL(fileURLWithPath: - "/Users/helge/dev/Swift/Lighter/NorthwindSQLite.swift/src/create.sql" + "/Users/helge/dev/Swift/Northwind/NorthwindSQLite.swift/src/create.sql" ) var hasFile: Bool { FileManager.default.isReadableFile(atPath: url.path)