Remove jsonErrorPosition unless GRDBCUSTOMSQLITE || GRDBCIPHER

For some reason, if #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) has stopped being able to skip the test (WTF?)
This commit is contained in:
Gwendal Roué committed 2024-03-19 12:15:47 +01:00
1 parent 4e0ab25106
commit 5413dcfeeb
3 files changed
+3 -21

No files matched your search

-1
View File
@@ -147,5 +147,4 @@ The `->` and `->>` SQL operators are available on the ``SQLJSONExpressible`` pro
### Validate JSON values at the SQL level
- ``Database/jsonErrorPosition(_:)``
- ``Database/jsonIsValid(_:)``
-15
View File
@@ -521,21 +521,6 @@ extension Database {
.function("JSON_ARRAY_LENGTH", [value.sqlExpression, path.sqlExpression])
}
/// The `JSON_ERROR_POSITION` SQL function.
///
/// For example:
///
/// ```swift
/// // JSON_ERROR_POSITION(info)
/// Database.jsonErrorPosition(Column("info"))
/// ```
///
/// Related SQLite documentation: <https://www.sqlite.org/json1.html#jerr>
@available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *)
public static func jsonErrorPosition(_ value: some SQLExpressible) -> SQLExpression {
.function("JSON_ERROR_POSITION", [value.sqlExpression])
}
/// The `JSON_EXTRACT` SQL function.
///
/// For example:
+3 -5
View File
@@ -358,11 +358,6 @@ final class JSONExpressionsTests: GRDBTestCase {
guard sqlite3_libversion_number() >= 3042000 else {
throw XCTSkip("JSON_ERROR_JSON is not available")
}
#else
guard #available(iOS 9999, macOS 9999, tvOS 9999, watchOS 9999, *) else {
throw XCTSkip("JSON_ERROR_JSON is not available")
}
#endif
try makeDatabaseQueue().inDatabase { db in
try db.create(table: "player") { t in
@@ -385,6 +380,9 @@ final class JSONExpressionsTests: GRDBTestCase {
SELECT JSON_ERROR_POSITION("info") FROM "player"
""")
}
#else
throw XCTSkip("JSON_ERROR_JSON is not available")
#endif
}
func test_Database_jsonExtract_atPath() throws {