Field-Condition Clause (Reference)
A field-condition clause specifies that a given object field must satisfy a given set of criteria. It constrains a field using one or more condition-operator clauses, each of which is a comparison clause, a not clause, or an item-method clause.
A field-condition clause is JSON-object member whose field is not an operator and whose value is an object with one or more members, each of which is a condition-operator clause:
field : { condition-operator-clause ... }
A field-condition clause tests whether the field satisfies all of the condition-operator clauses, which are thus implicitly ANDed.
A condition-operator clause is any of these:
-
A comparison clause
-
A not clause
-
An item-method clause
When a path that does not end in an array step uses a comparison clause or a not clause, and the path targets an array, the test applies to each element of the array.
For example, the filter {"animal" : {"$eq" : "cat"}} matches the JSON data {"animal" : ["dog", "cat"]}, even though "cat" is an array element. The filter {"animal" : {$not : {"$eq" : "frog"}}} matches the same data, because each of the array elements is tested for equality with "frog" and this test fails.
-
A comparison clause is an object member whose field is a comparison operator. Example:
"$gt" : 200. -
A not clause logically negates the truth value of a set of comparison clauses. When any of the comparison clauses is true, the not clause evaluates to false; when all of them are false, the not clause evaluates to true.
-
Item-Method Clause (Reference) An item-method clause is an item-method equality clause or an item-method modifier clause. It applies an item method to the field of the field-condition clause in which it appears, typically to modify the field value. It then matches the result against the operand of the item-method.
-
ISO 8601 Date, Time, and Duration Support International Standards Organization (ISO) standard 8601 describes an internationally accepted way to represent dates, times, and durations. Oracle Database supports the most common ISO 8601 formats as proper Oracle SQL date, time, and interval (duration) values. The formats that are supported are essentially those that are numeric-only, language-neutral, and unambiguous.
Related Topics