From 348679f83d006cd234c185234a30924b92c73d38 Mon Sep 17 00:00:00 2001 From: Ben Myers Date: Wed, 29 Mar 2023 19:29:20 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Querying=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/EasyFirebase/Extensions/KeyPath.swift | 2 +- Sources/EasyFirebase/Services/Firestore/Querying.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/EasyFirebase/Extensions/KeyPath.swift b/Sources/EasyFirebase/Extensions/KeyPath.swift index b247ee0..6be997c 100644 --- a/Sources/EasyFirebase/Extensions/KeyPath.swift +++ b/Sources/EasyFirebase/Extensions/KeyPath.swift @@ -12,6 +12,6 @@ extension KeyPath { // MARK: - Internal Properties internal var string: String { - NSExpression(forKeyPath: self).keyPath + return NSExpression(forKeyPath: self).keyPath } } diff --git a/Sources/EasyFirebase/Services/Firestore/Querying.swift b/Sources/EasyFirebase/Services/Firestore/Querying.swift index 87f01d6..65118cf 100644 --- a/Sources/EasyFirebase/Services/Firestore/Querying.swift +++ b/Sources/EasyFirebase/Services/Firestore/Querying.swift @@ -18,7 +18,7 @@ extension EasyFirestore { */ public struct Querying { - public typealias ConditionBlock = (KeyPath, Condition.Comparison, V) + public typealias ConditionBlock = (KeyPath, Condition.Comparison, Any) // MARK: - Public Static Methods @@ -61,7 +61,7 @@ extension EasyFirestore { */ public static func `where`(_ path: KeyPath, _ comparison: Condition.Comparison, - _ value: V, + _ value: Any, order: Order? = nil, limit: Int? = nil, completion: @escaping ([T]) -> Void @@ -168,7 +168,7 @@ extension EasyFirestore { /// The comparison used to filter a query. public var comparison: Comparison /// The value to check. - public var value: V + public var value: Any // MARK: - Internal Methods