Skip to content

Commit

Permalink
this breaks something (not sure what) but we don't need it anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
aapis committed Feb 12, 2023
1 parent 430e34c commit 7076f2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
<relationship name="tasks" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="LogTask" inverseName="owner" inverseEntity="LogTask"/>
</entity>
<entity name="LogRecord" representedClassName="LogRecord" syncable="YES" codeGenerationType="class">
<attribute name="alive" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
<attribute name="message" optional="YES" attributeType="String"/>
<attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO" customClassName="Date"/>
<relationship name="job" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Job" inverseName="records" inverseEntity="Job"/>
</entity>
<entity name="LogTask" representedClassName="LogTask" syncable="YES" codeGenerationType="class">
<attribute name="alive" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
<attribute name="completedDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
<attribute name="content" optional="YES" attributeType="String"/>
<attribute name="created" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
Expand Down
4 changes: 2 additions & 2 deletions DLPrototype/Views/Find/Results/Results.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct Results: View {
// all attempts to refactor this failed
// fetch all records matching $text
let rr: NSFetchRequest<LogRecord> = LogRecord.fetchRequest()
rr.predicate = NSPredicate(format: "message CONTAINS[c] %@ AND alive = true", text.wrappedValue)
rr.predicate = NSPredicate(format: "message CONTAINS[c] %@", text.wrappedValue)
rr.sortDescriptors = [
NSSortDescriptor(keyPath: \LogRecord.timestamp, ascending: false)
]
Expand All @@ -79,7 +79,7 @@ struct Results: View {

// fetch all tasks matching $text
let tr: NSFetchRequest<LogTask> = LogTask.fetchRequest()
tr.predicate = NSPredicate(format: "content CONTAINS[c] %@ AND alive = true", text.wrappedValue)
tr.predicate = NSPredicate(format: "content CONTAINS[c] %@", text.wrappedValue)
tr.sortDescriptors = [
NSSortDescriptor(keyPath: \LogTask.created, ascending: false)
]
Expand Down

0 comments on commit 7076f2f

Please sign in to comment.