Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/CaseStudies/DynamicQuery.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct DynamicQueryDemo: SwiftUICaseStudy {
func fetch(_ db: Database) throws -> Value {
let search =
Fact
.where { $0.body.contains(query) }
.where { $0.body.like("%\(query)%") }
.order { $0.id.desc() }
return try Value(
facts: search.fetchAll(db),
Expand Down
2 changes: 2 additions & 0 deletions Examples/Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,8 @@
isa = XCLocalSwiftPackageReference;
relativePath = ..;
traits = (
LazyInitializableByDefault,
StrictDecoding,
);
};
/* End XCLocalSwiftPackageReference section */
Expand Down
1 change: 1 addition & 0 deletions Examples/Reminders/Schema.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ nonisolated struct Reminder: Hashable, Identifiable {
var notes = ""
var position = 0
var priority: Priority?
@Column(lazyInitializable: false)
var remindersListID: RemindersList.ID
var status: Status = .incomplete
var title = ""
Expand Down
2 changes: 1 addition & 1 deletion Examples/SyncUps/Dependencies/SpeechClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ nonisolated struct SpeechClient: DependencyKey {
requestAuthorization: { .authorized },
startTask: {
AsyncThrowingStream { continuation in
Task { @MainActor in
_ = Task { @MainActor in
isRecording.setValue(true)
var finalText = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor \
Expand Down
2 changes: 1 addition & 1 deletion Examples/SyncUps/SyncUpDetail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final class SyncUpDetailModel: HashableObject {
withErrorReporting {
try database.write { db in
let ids = indices.map { meetings[$0].id }
try Meeting.where { ids.contains($0.id) }.delete().execute(db)
try Meeting.where { $0.id.in(ids) }.delete().execute(db)
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ let package = Package(
),
],
traits: [
.trait(
name: "LazyInitializableByDefault",
description: "Optionalize draft properties that have no default."
),
.trait(
name: "StrictDecoding",
description: """
Expand Down Expand Up @@ -57,6 +61,10 @@ let package = Package(
branch: "strict-decoding",
// from: "0.32.0",
traits: [
.trait(
name: "LazyInitializableByDefault",
condition: .when(traits: ["LazyInitializableByDefault"])
),
.trait(name: "CasePaths", condition: .when(traits: ["CasePaths"])),
.trait(name: "Tagged", condition: .when(traits: ["Tagged"])),
]
Expand Down