JSONExistsAny return true if any value in dArray is exist in the json
(json DJSON, dArray *DArray)
| 408 | |
| 409 | // JSONExistsAny return true if any value in dArray is exist in the json |
| 410 | func JSONExistsAny(json DJSON, dArray *DArray) (*DBool, error) { |
| 411 | // TODO(justin): this can be optimized. |
| 412 | for _, k := range dArray.Array { |
| 413 | if k == DNull { |
| 414 | continue |
| 415 | } |
| 416 | e, err := json.JSON.Exists(string(MustBeDString(k))) |
| 417 | if err != nil { |
| 418 | return nil, err |
| 419 | } |
| 420 | if e { |
| 421 | return DBoolTrue, nil |
| 422 | } |
| 423 | } |
| 424 | return DBoolFalse, nil |
| 425 | } |
| 426 | |
| 427 | func initArrayToArrayConcatenation() { |
| 428 | for _, t := range types.Scalar { |
nothing calls this directly
no test coverage detected
searching dependent graphs…