diff --git a/GRDB/Documentation.docc/JSON.md b/GRDB/Documentation.docc/JSON.md index 581561b67..34fdba125 100644 --- a/GRDB/Documentation.docc/JSON.md +++ b/GRDB/Documentation.docc/JSON.md @@ -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(_:)`` diff --git a/GRDB/JSON/SQLJSONFunctions.swift b/GRDB/JSON/SQLJSONFunctions.swift index 0972c2509..85122f289 100644 --- a/GRDB/JSON/SQLJSONFunctions.swift +++ b/GRDB/JSON/SQLJSONFunctions.swift @@ -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: - @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: diff --git a/Tests/GRDBTests/JSONExpressionsTests.swift b/Tests/GRDBTests/JSONExpressionsTests.swift index 666cdde8b..f0b439092 100644 --- a/Tests/GRDBTests/JSONExpressionsTests.swift +++ b/Tests/GRDBTests/JSONExpressionsTests.swift @@ -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 {