Skip to content

Commit 07c0cde

Browse files
committed
Merge branch 'develop'
2 parents 205fc66 + f50bdef commit 07c0cde

File tree

9 files changed

+112
-4
lines changed

9 files changed

+112
-4
lines changed

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
.DS_Store
1+
.DS_Store
2+
.build
3+
update.sql
4+
Package.resolved
5+
.swiftpm
6+

Lighter.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"__doc__": "Configuration used for the manual, builtin codegen.",
3+
4+
"databaseExtensions" : [ "sqlite3", "db", "sqlite" ],
5+
"sqlExtensions" : [ "sql" ],
6+
7+
"CodeStyle": {
8+
"functionCommentStyle" : "**",
9+
"indent" : " ",
10+
"lineLength" : 80
11+
},
12+
13+
"SwiftMapping": {
14+
"databaseTypeName": "Northwind",
15+
"recordTypeNames": {
16+
"singularize" : true,
17+
"capitalize" : true,
18+
"camelCase" : true
19+
}
20+
},
21+
22+
"CodeGeneration": {
23+
"readOnly" : false,
24+
"generateAsyncFunctions" : true,
25+
"inlinable" : true,
26+
"public" : true,
27+
"allowFoundation" : true,
28+
"swiftFilters" : true,
29+
"showViewHintComment" : false,
30+
"commentsWithSQL" : true,
31+
"extraRecordTypeConformances" : [ "Codable" ],
32+
"embedRecordTypesInDatabaseType" : false,
33+
"optionalHelpersInDatabase" : true,
34+
"Raw": {
35+
"prefix" : "sqlite3_",
36+
"hashable" : true,
37+
"relationships" : true,
38+
},
39+
"Lighter": {
40+
"import" : "reexport",
41+
"relationships" : true,
42+
"useSQLiteValueTypeBinds" : false
43+
}
44+
}
45+
}

Package.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// swift-tools-version:5.6
2+
3+
import PackageDescription
4+
5+
var package = Package(
6+
name: "Northwind",
7+
8+
platforms: [ .macOS(.v10_15), .iOS(.v13) ],
9+
products: [
10+
.library(name: "Northwind", targets: [ "Northwind" ])
11+
],
12+
13+
dependencies: [
14+
.package(url: "git@github.com:55DB091A-8471-447B-8F50-5DFF4C1B14AC/Lighter.git",
15+
from: "1.0.0"),
16+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
17+
],
18+
19+
targets: [
20+
.target(name : "Northwind",
21+
dependencies : [ "Lighter" ],
22+
path : "dist",
23+
resources : [ .copy("northwind.db") ],
24+
plugins : [ .plugin(name: "Enlighter", package: "Lighter") ])
25+
]
26+
)

Package@swift-5.7.swift

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// swift-tools-version:5.7
2+
3+
import PackageDescription
4+
5+
var package = Package(
6+
name: "Northwind",
7+
8+
platforms: [ .macOS(.v10_15), .iOS(.v13) ],
9+
products: [
10+
.library(name: "Northwind", targets: [ "Northwind" ])
11+
],
12+
13+
dependencies: [
14+
.package(url: "git@github.com:55DB091A-8471-447B-8F50-5DFF4C1B14AC/Lighter.git",
15+
from: "1.0.0"),
16+
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
17+
],
18+
19+
targets: [
20+
.target(name : "Northwind",
21+
dependencies : [ "Lighter" ],
22+
path : "dist",
23+
resources : [ .copy("northwind.db") ],
24+
plugins : [ .plugin(name: "Enlighter", package: "Lighter") ])
25+
]
26+
)

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Northwind-SQLite3
1+
# Northwind-SQLite3.swift
2+
3+
2022-08-04: A fork of Northwind-SQLite3 which packages Northwind as a Swift
4+
module.
5+
6+
<hr />
27

38
This is a version of the Microsoft Access 2000 Northwind sample database, re-engineered for SQLite3.
49

dist/MarkAsSwift.swift

Whitespace-only changes.

dist/northwind.db

0 Bytes
Binary file not shown.

makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ clean:
1111
mkdir ./dist
1212

1313
build: clean
14+
touch dist/MarkAsSwift.swift
1415
sqlite3 dist/northwind.db < src/create.sql > /dev/null
1516
sqlite3 dist/northwind.db < src/update.sql > /dev/null
1617
sqlite3 dist/northwind.db < src/report.sql

src/update.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,6 @@ p.*,
8383
c.CategoryName, c.Description as [CategoryDescription],
8484
s.CompanyName as [SupplierName], s.Region as [SupplierRegion]
8585
from [Products] p
86-
join [Categories] c on p.CategoryId = c.id
87-
join [Suppliers] s on s.id = p.SupplierId;
86+
join [Categories] c on p.CategoryId = c.CategoryId
87+
join [Suppliers] s on s.SupplierId = p.SupplierId;
8888

0 commit comments

Comments
 (0)