-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve equatable comparison of QueryConstraint (#275)
* fix: improve equatable comparison of QueryConstraint * nits
- Loading branch information
Showing
21 changed files
with
194 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../ParseSwift/Internal/Data+hexString.swift → Sources/ParseSwift/Extensions/Data.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Data+hexString.swift | ||
// Data.swift | ||
// ParseSwift | ||
// | ||
// Created by Corey Baker on 2/14/21. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Date.swift | ||
// ParseSwift | ||
// | ||
// Created by Corey Baker on 11/4/21. | ||
// Copyright © 2021 Parse Community. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// MARK: Date | ||
internal extension Date { | ||
func parseFormatted() -> String { | ||
return ParseCoding.dateFormatter.string(from: self) | ||
} | ||
|
||
var parseRepresentation: [String: String] { | ||
return ["__type": "Date", "iso": parseFormatted()] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// Encodable.swift | ||
// ParseSwift | ||
// | ||
// Created by Corey Baker on 11/4/21. | ||
// Copyright © 2021 Parse Community. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
internal extension Encodable { | ||
func isEqual(_ other: Encodable) -> Bool { | ||
guard let lhsData = try? ParseCoding.parseEncoder().encode(self), | ||
let lhsString = String(data: lhsData, encoding: .utf8), | ||
let rhsData = try? ParseCoding.parseEncoder().encode(other), | ||
let rhsString = String(data: rhsData, encoding: .utf8) else { | ||
return false | ||
} | ||
return lhsString == rhsString | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ | |
|
||
import Foundation | ||
|
||
struct BaseConfig: ParseConfig { } | ||
struct BaseConfig: ParseConfig {} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters