visibility.go ×8

Frontier kind: Code frontier

unlabeled · c_539529fccb6a

22 tests · 3283 LOC · 158 files · introduces 0 tests · 22 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges22 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
540 ranges3283 lines · 158 files · Browse complete extent
All tests (intent)
22 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: 22 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/sql/sqlplugin/mysql/visibility.go 22 introduced LOC · 8 ranges

Open complete file

133 ctx context.Context,
134 row *sqlplugin.VisibilityRow,
135 > ) (result sql.Result, retError error) { visibility.go
136 > defer func() {
137 > retError = mdb.handle.ConvertError(retError)
138 > }()
139 > finalRow := mdb.prepareRowForDB(row)
140 > db, err := mdb.handle.DB()
141 > if err != nil {
142 return nil, err
143 }
144 > tx, err := db.BeginTxx(ctx, nil) visibility.go
145 > if err != nil {
146 return nil, err
147 }
148 > defer func() { visibility.go
149 > err := tx.Rollback()
150 > // If the error is sql.ErrTxDone, it means the transaction already closed, so ignore error.
151 > if err != nil && !errors.Is(err, sql.ErrTxDone) {
152 // Transaction rollback error should never happen, unless db connection was lost.
153 retError = fmt.Errorf("transaction rollback failed: %w", retError)
154 }
155 }()
156 > result, err = tx.NamedExecContext(ctx, templateUpsertWorkflowExecution, finalRow) visibility.go
157 > if err != nil {
158 return nil, fmt.Errorf("unable to upsert workflow execution: %w", err)
159 }
160 > _, err = tx.NamedExecContext(ctx, templateUpsertCustomSearchAttributes, finalRow) visibility.go
161 > if err != nil {
162 return nil, fmt.Errorf("unable to upsert custom search attributes: %w", err)
163 }
164 > _, err = tx.NamedExecContext(ctx, templateUpsertChasmSearchAttributes, finalRow) visibility.go
165 > if err != nil {
166 return nil, fmt.Errorf("unable to upsert chasm search attributes: %w", err)
167 }
168 > err = tx.Commit() visibility.go
169 > if err != nil {
170 return nil, err
171 }
172 > return result, nil visibility.go
173 }
174