|
|
|
@ -874,33 +874,6 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp, |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case jpiAdd: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_add_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiSub: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_sub_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiMul: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_mul_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiDiv: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_div_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiMod: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_mod_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiPlus: |
|
|
|
|
return executeUnaryArithmExpr(cxt, jsp, jb, NULL, found); |
|
|
|
|
|
|
|
|
|
case jpiMinus: |
|
|
|
|
return executeUnaryArithmExpr(cxt, jsp, jb, numeric_uminus, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiFilter: |
|
|
|
|
{ |
|
|
|
|
JsonPathBool st; |
|
|
|
@ -980,6 +953,33 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp, |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case jpiAdd: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_add_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiPlus: |
|
|
|
|
return executeUnaryArithmExpr(cxt, jsp, jb, NULL, found); |
|
|
|
|
|
|
|
|
|
case jpiSub: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_sub_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiMinus: |
|
|
|
|
return executeUnaryArithmExpr(cxt, jsp, jb, numeric_uminus, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiMul: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_mul_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiDiv: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_div_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiMod: |
|
|
|
|
return executeBinaryArithmExpr(cxt, jsp, jb, |
|
|
|
|
numeric_mod_opt_error, found); |
|
|
|
|
|
|
|
|
|
case jpiType: |
|
|
|
|
{ |
|
|
|
|
JsonbValue *jbv = palloc(sizeof(*jbv)); |
|
|
|
@ -1021,18 +1021,6 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp, |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case jpiAbs: |
|
|
|
|
return executeNumericItemMethod(cxt, jsp, jb, unwrap, numeric_abs, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiFloor: |
|
|
|
|
return executeNumericItemMethod(cxt, jsp, jb, unwrap, numeric_floor, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiCeiling: |
|
|
|
|
return executeNumericItemMethod(cxt, jsp, jb, unwrap, numeric_ceil, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiDouble: |
|
|
|
|
{ |
|
|
|
|
JsonbValue jbv; |
|
|
|
@ -1098,6 +1086,18 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp, |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case jpiAbs: |
|
|
|
|
return executeNumericItemMethod(cxt, jsp, jb, unwrap, numeric_abs, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiCeiling: |
|
|
|
|
return executeNumericItemMethod(cxt, jsp, jb, unwrap, numeric_ceil, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiFloor: |
|
|
|
|
return executeNumericItemMethod(cxt, jsp, jb, unwrap, numeric_floor, |
|
|
|
|
found); |
|
|
|
|
|
|
|
|
|
case jpiDatetime: |
|
|
|
|
if (unwrap && JsonbType(jb) == jbvArray) |
|
|
|
|
return executeItemUnwrapTargetArray(cxt, jsp, jb, found, false); |
|
|
|
|