visibility.go ×8

Frontier kind: Code frontier

unlabeled · c_68464b64947a

23 tests · 3284 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)
541 ranges3284 lines · 158 files · Browse complete extent
All tests (intent)
23 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

88 ctx context.Context,
89 row *sqlplugin.VisibilityRow,
90 > ) (result sql.Result, retError error) { visibility.go
91 > finalRow := mdb.prepareRowForDB(row)
92 > defer func() {
93 > retError = mdb.handle.ConvertError(retError)
94 > }()
95 > db, err := mdb.handle.DB()
96 > if err != nil {
97 return nil, err
98 }
99
100 > tx, err := db.BeginTxx(ctx, nil) visibility.go
101 > if err != nil {
102 return nil, err
103 }
104 > defer func() { visibility.go
105 > err := tx.Rollback()
106 > // If the error is sql.ErrTxDone, it means the transaction already closed, so ignore error.
107 > if err != nil && !errors.Is(err, sql.ErrTxDone) {
108 // Transaction rollback error should never happen, unless db connection was lost.
109 retError = fmt.Errorf("transaction rollback failed: %w", retError)
110 }
111 }()
112 > result, err = tx.NamedExecContext(ctx, templateInsertWorkflowExecution, finalRow) visibility.go
113 > if err != nil {
114 return nil, fmt.Errorf("unable to insert workflow execution: %w", err)
115 }
116 > _, err = tx.NamedExecContext(ctx, templateInsertCustomSearchAttributes, finalRow) visibility.go
117 > if err != nil {
118 return nil, fmt.Errorf("unable to insert custom search attributes: %w", err)
119 }
120 > _, err = tx.NamedExecContext(ctx, templateInsertChasmSearchAttributes, finalRow) visibility.go
121 > if err != nil {
122 return nil, fmt.Errorf("unable to insert chasm search attributes: %w", err)
123 }
124 > err = tx.Commit() visibility.go
125 > if err != nil {
126 return nil, err
127 }
128 > return result, nil visibility.go
129 }
130