If any step in the path expression does not result in a match, then the function returns null by default. If multiple values match the path expression, or if only one scalar value matches the path expression, then you must wrap the value(s) in an array wrapper. Refer to the JSON_query_returning_clause. You can specify the JSON_query_returning_clause to control the data type and format of the return character string. A path expression that consists of a dollar sign followed by zero steps ( '$') matches the entire context item. All values are returned using strict JSON syntax, regardless of whether the original JSON data used strict or lax JSON syntax. The order of the sequence is nondeterministic. The function returns the value(s) matched in the final step as a comma-separated sequence of values in a character string. If the second step results in a match, then the function attempts to match the third step to the JSON values(s) that matched the second step, and so on. If the first step results in a match, then the function attempts to match the second step to the JSON value(s) that matched the first step. The function attempts to match the first step in the path expression to the context item. The dollar sign is followed by zero or more steps, each of which can be an object step or an array step. The path expression must begin with a dollar sign ( $), which represents the context item, that is, the expression specified by expr. The path expression must be a text literal. The function uses the path expression to evaluate expr and find one or more JSON values that match, or satisfy, the path expression. Use this clause to specify a JSON path expression. You must specify FORMAT JSON if expr is a column of data type BLOB. You can use the JSON_query_on_error_clause to override this default behavior. If expr is not a text literal of well-formed JSON data using strict or lax syntax, then the function returns null by default. If expr is null, then the function returns null. If expr is a column, then the column must be of data type VARCHAR2, CLOB, or BLOB. For expr, specify an expression that evaluates to a text literal. Use this clause to specify the JSON data to be evaluated. JSON_QUERY finds one or more specified JSON values in JSON data and returns the values in a character string. The JSON_QUERY function is available starting with Oracle Database 12 c Release 1 (12.1.0.2).ĭescription of the illustration ''json_query.gif''ĭescription of the illustration ''json_path_expression.gif''ĭescription of the illustration ''object_step.gif''ĭescription of the illustration ''array_step.gif''ĭescription of the illustration ''json_query_returning_clause.gif''ĭescription of the illustration ''json_query_return_type.gif''ĭescription of the illustration ''json_query_wrapper_clause.gif''ĭescription of the illustration ''json_query_on_error_clause.gif''
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |