Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Aug 21, 2023
1 parent 61eb967 commit ad8b287
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Sources/MongoDBModel/ComparisonQueryOperator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Predicate

/// Comparison Query Operators
///
Expand Down Expand Up @@ -44,7 +43,7 @@ public enum ComparisonQueryOperator: String, Codable, CaseIterable {

public extension ComparisonQueryOperator {

init?(predicate: Comparison.Operator) {
init?(predicate: FetchRequest.Predicate.Comparison.Operator) {
switch predicate {
case .equalTo:
self = .equalTo
Expand Down
3 changes: 1 addition & 2 deletions Sources/MongoDBModel/LogicalQueryOperator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import Foundation
import Predicate

/// Logical Query Operators
///
Expand All @@ -32,7 +31,7 @@ public enum LogicalQueryOperator: String, Codable, CaseIterable {

public extension LogicalQueryOperator {

init(predicate: Compound.Logical​Type) {
init(predicate: FetchRequest.Predicate.Compound.Logical​Type) {
switch predicate {
case .and:
self = .and
Expand Down
9 changes: 4 additions & 5 deletions Sources/MongoDBModel/Predicate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@

import Foundation
import CoreModel
import Predicate
import MongoSwift

public extension BSONDocument {

init?(predicate: Predicate) {
init?(predicate: FetchRequest.Predicate) {
switch predicate {
case .comparison(let comparison):
self.init(predicate: comparison)
Expand All @@ -26,7 +25,7 @@ public extension BSONDocument {

public extension BSONDocument {

init?(predicate: Compound) {
init?(predicate: FetchRequest.Predicate.Compound) {
guard predicate.type != .not else {
// { field: { $not: { <operator-expression> } } }
return nil
Expand All @@ -49,8 +48,8 @@ public extension BSONDocument {

init?(predicate: Comparison) {
// { <field>: { $eq: <value> } }
return nil
}
return nil
}
}

public extension BSON {
Expand Down

0 comments on commit ad8b287

Please sign in to comment.