converter_legacy.go ×13

Frontier kind: Code frontier

unlabeled · c_9f912787892e

20 tests · 1868 LOC · 80 files · introduces 0 tests · 36 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
13 ranges36 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
260 ranges1868 lines · 80 files · Browse complete extent
All tests (intent)
20 testsBrowse 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.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

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

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

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

Open complete file

69 )
70
71 > func NewConverterLegacy(fnInterceptor FieldNameInterceptor, whereConverter ExprConverter) *ConverterLegacy { converter_legacy.go
72 > if fnInterceptor == nil {
73 fnInterceptor = &NopFieldNameInterceptor{}
74 }
75 > return &ConverterLegacy{ converter_legacy.go
76 > fnInterceptor: fnInterceptor,
77 > whereConverter: whereConverter,
78 > }
79 }
80
130 fvInterceptor FieldValuesInterceptor,
131 notBetweenSupported bool,
132 > ) ExprConverter { converter_legacy.go
133 > if fnInterceptor == nil {
134 fnInterceptor = &NopFieldNameInterceptor{}
135 }
136 > if fvInterceptor == nil { converter_legacy.go
137 fvInterceptor = &NopFieldValuesInterceptor{}
138 }
139 > return &rangeCondConverter{ converter_legacy.go
140 > fnInterceptor: fnInterceptor,
141 > fvInterceptor: fvInterceptor,
142 > notBetweenSupported: notBetweenSupported,
143 > }
144 }
145
150 customSaNameType searchattribute.NameTypeMap,
151 chasmMapper *chasm.VisibilitySearchAttributesMapper,
152 > ) ExprConverter { converter_legacy.go
153 > if fnInterceptor == nil {
154 fnInterceptor = &NopFieldNameInterceptor{}
155 }
156 > if fvInterceptor == nil { converter_legacy.go
157 fvInterceptor = &NopFieldValuesInterceptor{}
158 }
159
160 > combinedTypeMap := store.CombineTypeMaps(customSaNameType, chasmMapper) converter_legacy.go
161 >
162 > return &comparisonExprConverter{
163 > fnInterceptor: fnInterceptor,
164 > fvInterceptor: fvInterceptor,
165 > allowedOperators: allowedOperators,
166 > combinedTypeMap: combinedTypeMap,
167 > chasmMapper: chasmMapper,
168 > }
169 }
170
197 //
198 //nolint:staticcheck
199 > func (c *ConverterLegacy) ConvertSql(sql string) (*QueryParamsLegacy, error) { converter_legacy.go
200 > stmt, err := sqlparser.Parse(sql)
201 > if err != nil {
202 return nil, NewConverterError("%s: %v", MalformedSqlQueryErrMessage, err)
203 }
204
205 > selectStmt, isSelect := stmt.(*sqlparser.Select) converter_legacy.go
206 > if !isSelect {
207 return nil, NewConverterError("%s: statement must be 'select' not %T", NotSupportedErrMessage, stmt)
208 }
209
210 > return c.convertSelect(selectStmt) converter_legacy.go
211 }
212
213 > func (c *ConverterLegacy) convertSelect(sel *sqlparser.Select) (*QueryParamsLegacy, error) { converter_legacy.go
214 > if sel.Limit != nil {
215 return nil, NewConverterError("%s: 'limit' clause", NotSupportedErrMessage)
216 }
217
218 > queryParams := &QueryParamsLegacy{} converter_legacy.go
219 > if sel.Where != nil {
220 query, err := c.whereConverter.Convert(sel.Where.Expr)
221 if err != nil {