cluster_metadata.go ×6

Frontier kind: Code frontier

unlabeled · c_6eeb35cdee01

14 tests · 4358 LOC · 189 files · introduces 0 tests · 46 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges46 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
831 ranges4358 lines · 189 files · Browse complete extent
All tests (intent)
14 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: 46 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/sql/sqlplugin/sqlite/cluster_metadata.go 46 introduced LOC · 6 ranges

Open complete file

55 ctx context.Context,
56 row *sqlplugin.ClusterMetadataRow,
57 > ) (sql.Result, error) { cluster_metadata.go
58 > if row.Version == 0 {
59 > return mdb.conn.ExecContext(ctx,
60 > insertClusterMetadataQry,
61 > constMetadataPartition,
62 > row.ClusterName,
63 > row.Data,
64 > row.DataEncoding,
65 > 1,
66 > )
67 > }
68 return mdb.conn.ExecContext(ctx,
69 updateClusterMetadataQry,
79 ctx context.Context,
80 filter *sqlplugin.ClusterMetadataFilter,
81 > ) ([]sqlplugin.ClusterMetadataRow, error) { cluster_metadata.go
82 > var err error
83 > var rows []sqlplugin.ClusterMetadataRow
84 > switch {
85 case len(filter.ClusterName) != 0:
86 err = mdb.conn.SelectContext(ctx,
91 filter.PageSize,
92 )
93 > default: cluster_metadata.go
94 > err = mdb.conn.SelectContext(ctx,
95 > &rows,
96 > listClusterMetadataQry,
97 > constMetadataPartition,
98 > filter.PageSize,
99 > )
100 }
101 > return rows, err cluster_metadata.go
102 }
103
105 ctx context.Context,
106 filter *sqlplugin.ClusterMetadataFilter,
107 > ) (*sqlplugin.ClusterMetadataRow, error) { cluster_metadata.go
108 > var row sqlplugin.ClusterMetadataRow
109 > err := mdb.conn.GetContext(ctx,
110 > &row,
111 > getClusterMetadataQry,
112 > constMetadataPartition,
113 > filter.ClusterName,
114 > )
115 > if err != nil {
116 > return nil, err
117 > }
118 > return &row, err
119 }
120
122 ctx context.Context,
123 filter *sqlplugin.ClusterMetadataFilter,
124 > ) (*sqlplugin.ClusterMetadataRow, error) { cluster_metadata.go
125 > var row sqlplugin.ClusterMetadataRow
126 > err := mdb.conn.GetContext(ctx,
127 > &row,
128 > writeLockGetClusterMetadataQry,
129 > constMetadataPartition,
130 > filter.ClusterName,
131 > )
132 > if err != nil {
133 > return nil, err
134 > }
135 return &row, err
136 }