Skip to content

Commit

Permalink
Fix Northwind.swift links
Browse files Browse the repository at this point in the history
...
  • Loading branch information
helje5 committed Oct 12, 2023
1 parent af27dea commit 7b7469c
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<img src="https://zeezide.com/img/lighter/docc-record-type.png" />
<img src="https://zeezide.com/img/lighter/docc-target.png" />
Expand Down
2 changes: 1 addition & 1 deletion Sources/Lighter/Lighter.docc/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions Sources/Lighter/Lighter.docc/Lighter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Sources/Lighter/Lighter.docc/LighterAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ dependency free code for a database: <doc:SQLiteAPI>.

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:
Expand Down Expand Up @@ -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 <doc:Configuration>, the database structure conforms to e.g.:
- ``SQLDatabase``: This handles opening the database etc.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Sources/Lighter/Lighter.docc/Linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion Sources/Lighter/Lighter.docc/Mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions Sources/Lighter/Lighter.docc/Northwind.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions Sources/Lighter/Lighter.docc/SQLiteAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion Tests/NorthwindTests/NorthwindTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7b7469c

Please sign in to comment.