converter_legacy.go ×9

Frontier kind: Joint frontier

unlabeled · c_e496f8b6c8a2

1 test · 2135 LOC · 86 files · introduces 1 test · 26 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges26 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
366 ranges2135 lines · 86 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 26 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/visibility/store/query/converter_legacy.go 26 introduced LOC · 9 ranges

Open complete file

312 _, isLEAnd := leftExpr.(*sqlparser.AndExpr)
313 if isLQBool && isLEAnd {
314 > return lqBool.Filter(rightQuery), nil converter_legacy.go
315 > }
316
317 rqBool, isRQBool := rightQuery.(*elastic.BoolQuery)
388 case "between":
389 query = elastic.NewRangeQuery(colName).Gte(fromValue).Lte(toValue)
390 > case "not between": converter_legacy.go
391 > if !r.notBetweenSupported {
392 return nil, NewConverterError("%s: 'not between' expression", NotSupportedErrMessage)
393 }
394 > query = elastic.NewBoolQuery().MustNot(elastic.NewRangeQuery(colName).Gte(fromValue).Lte(toValue)) converter_legacy.go
395 default:
396 return nil, NewConverterError("%s: range condition operator must be 'between' or 'not between'", InvalidExpressionErrMessage)
414 case "is null":
415 query = elastic.NewBoolQuery().MustNot(elastic.NewExistsQuery(colName))
416 > case "is not null": converter_legacy.go
417 > query = elastic.NewExistsQuery(colName)
418 default:
419 return nil, NewConverterError("%s: 'is' operator can be used with 'null' and 'not null' only", InvalidExpressionErrMessage)
468 //nolint:revive // missing default case
469 switch comparisonExpr.Operator {
470 > case sqlparser.GreaterEqualStr: converter_legacy.go
471 > query = elastic.NewRangeQuery(colName).Gte(colValues[0])
472 > case sqlparser.LessEqualStr:
473 > query = elastic.NewRangeQuery(colName).Lte(colValues[0])
474 case sqlparser.GreaterThanStr:
475 query = elastic.NewRangeQuery(colName).Gt(colValues[0])
483 query = elastic.NewMatchQuery(colName, colValues[0])
484 }
485 > case sqlparser.NotEqualStr: converter_legacy.go
486 > // Not elastic.NewTermQuery to support partial word match for String custom search attributes.
487 > if tp == enumspb.INDEXED_VALUE_TYPE_KEYWORD || tp == enumspb.INDEXED_VALUE_TYPE_KEYWORD_LIST {
488 > query = elastic.NewBoolQuery().MustNot(elastic.NewTermQuery(colName, colValues[0]))
489 > } else {
490 query = elastic.NewBoolQuery().MustNot(elastic.NewMatchQuery(colName, colValues[0]))
491 }
492 case sqlparser.InStr:
493 query = elastic.NewTermsQuery(colName, colValues...)
494 > case sqlparser.NotInStr: converter_legacy.go
495 > query = elastic.NewBoolQuery().MustNot(elastic.NewTermsQuery(colName, colValues...))
496 > case sqlparser.StartsWithStr:
497 > v, ok := colValues[0].(string)
498 > if !ok {
499 return nil, NewConverterError("right-hand side of '%v' must be a string", comparisonExpr.Operator)
500 }
501 > query = elastic.NewPrefixQuery(colName, v) converter_legacy.go
502 > case sqlparser.NotStartsWithStr:
503 > v, ok := colValues[0].(string)
504 > if !ok {
505 return nil, NewConverterError("right-hand side of '%v' must be a string", comparisonExpr.Operator)
506 }
507 > query = elastic.NewBoolQuery().MustNot(elastic.NewPrefixQuery(colName, v)) converter_legacy.go
508 }
509