Merge branch 'develop'
This commit is contained in:
commit
07c0cde980
|
@ -1 +1,6 @@
|
|||
.DS_Store
|
||||
.build
|
||||
update.sql
|
||||
Package.resolved
|
||||
.swiftpm
|
||||
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"__doc__": "Configuration used for the manual, builtin codegen.",
|
||||
|
||||
"databaseExtensions" : [ "sqlite3", "db", "sqlite" ],
|
||||
"sqlExtensions" : [ "sql" ],
|
||||
|
||||
"CodeStyle": {
|
||||
"functionCommentStyle" : "**",
|
||||
"indent" : " ",
|
||||
"lineLength" : 80
|
||||
},
|
||||
|
||||
"SwiftMapping": {
|
||||
"databaseTypeName": "Northwind",
|
||||
"recordTypeNames": {
|
||||
"singularize" : true,
|
||||
"capitalize" : true,
|
||||
"camelCase" : true
|
||||
}
|
||||
},
|
||||
|
||||
"CodeGeneration": {
|
||||
"readOnly" : false,
|
||||
"generateAsyncFunctions" : true,
|
||||
"inlinable" : true,
|
||||
"public" : true,
|
||||
"allowFoundation" : true,
|
||||
"swiftFilters" : true,
|
||||
"showViewHintComment" : false,
|
||||
"commentsWithSQL" : true,
|
||||
"extraRecordTypeConformances" : [ "Codable" ],
|
||||
"embedRecordTypesInDatabaseType" : false,
|
||||
"optionalHelpersInDatabase" : true,
|
||||
"Raw": {
|
||||
"prefix" : "sqlite3_",
|
||||
"hashable" : true,
|
||||
"relationships" : true,
|
||||
},
|
||||
"Lighter": {
|
||||
"import" : "reexport",
|
||||
"relationships" : true,
|
||||
"useSQLiteValueTypeBinds" : false
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
// swift-tools-version:5.6
|
||||
|
||||
import PackageDescription
|
||||
|
||||
var package = Package(
|
||||
name: "Northwind",
|
||||
|
||||
platforms: [ .macOS(.v10_15), .iOS(.v13) ],
|
||||
products: [
|
||||
.library(name: "Northwind", targets: [ "Northwind" ])
|
||||
],
|
||||
|
||||
dependencies: [
|
||||
.package(url: "git@github.com:55DB091A-8471-447B-8F50-5DFF4C1B14AC/Lighter.git",
|
||||
from: "1.0.0"),
|
||||
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
|
||||
],
|
||||
|
||||
targets: [
|
||||
.target(name : "Northwind",
|
||||
dependencies : [ "Lighter" ],
|
||||
path : "dist",
|
||||
resources : [ .copy("northwind.db") ],
|
||||
plugins : [ .plugin(name: "Enlighter", package: "Lighter") ])
|
||||
]
|
||||
)
|
|
@ -0,0 +1,26 @@
|
|||
// swift-tools-version:5.7
|
||||
|
||||
import PackageDescription
|
||||
|
||||
var package = Package(
|
||||
name: "Northwind",
|
||||
|
||||
platforms: [ .macOS(.v10_15), .iOS(.v13) ],
|
||||
products: [
|
||||
.library(name: "Northwind", targets: [ "Northwind" ])
|
||||
],
|
||||
|
||||
dependencies: [
|
||||
.package(url: "git@github.com:55DB091A-8471-447B-8F50-5DFF4C1B14AC/Lighter.git",
|
||||
from: "1.0.0"),
|
||||
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
|
||||
],
|
||||
|
||||
targets: [
|
||||
.target(name : "Northwind",
|
||||
dependencies : [ "Lighter" ],
|
||||
path : "dist",
|
||||
resources : [ .copy("northwind.db") ],
|
||||
plugins : [ .plugin(name: "Enlighter", package: "Lighter") ])
|
||||
]
|
||||
)
|
|
@ -1,4 +1,9 @@
|
|||
# Northwind-SQLite3
|
||||
# Northwind-SQLite3.swift
|
||||
|
||||
2022-08-04: A fork of Northwind-SQLite3 which packages Northwind as a Swift
|
||||
module.
|
||||
|
||||
<hr />
|
||||
|
||||
This is a version of the Microsoft Access 2000 Northwind sample database, re-engineered for SQLite3.
|
||||
|
||||
|
|
Binary file not shown.
1
makefile
1
makefile
|
@ -11,6 +11,7 @@ clean:
|
|||
mkdir ./dist
|
||||
|
||||
build: clean
|
||||
touch dist/MarkAsSwift.swift
|
||||
sqlite3 dist/northwind.db < src/create.sql > /dev/null
|
||||
sqlite3 dist/northwind.db < src/update.sql > /dev/null
|
||||
sqlite3 dist/northwind.db < src/report.sql
|
||||
|
|
|
@ -83,6 +83,6 @@ p.*,
|
|||
c.CategoryName, c.Description as [CategoryDescription],
|
||||
s.CompanyName as [SupplierName], s.Region as [SupplierRegion]
|
||||
from [Products] p
|
||||
join [Categories] c on p.CategoryId = c.id
|
||||
join [Suppliers] s on s.id = p.SupplierId;
|
||||
join [Categories] c on p.CategoryId = c.CategoryId
|
||||
join [Suppliers] s on s.SupplierId = p.SupplierId;
|
||||
|
||||
|
|
Loading…
Reference in New Issue