cluster_metadata.go ×7

Frontier kind: Code frontier

unlabeled · c_2ac12c54e991

3 tests · 5378 LOC · 203 files · introduces 0 tests · 63 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges63 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1043 ranges5378 lines · 203 files · Browse complete extent
All tests (intent)
3 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: 63 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/sql/sqlplugin/postgresql/cluster_metadata.go 63 introduced LOC · 7 ranges

Open complete file

61 ctx context.Context,
62 row *sqlplugin.ClusterMetadataRow,
63 > ) (sql.Result, error) { cluster_metadata.go
64 > if row.Version == 0 {
65 > return pdb.ExecContext(ctx,
66 > insertClusterMetadataQry,
67 > constMetadataPartition,
68 > row.ClusterName,
69 > row.Data,
70 > row.DataEncoding,
71 > 1,
72 > )
73 > }
74 > return pdb.ExecContext(ctx,
75 > updateClusterMetadataQry,
76 > row.Data,
77 > row.DataEncoding,
78 > row.Version+1,
79 > constMetadataPartition,
80 > row.ClusterName,
81 > )
82 }
83
85 ctx context.Context,
86 filter *sqlplugin.ClusterMetadataFilter,
87 > ) ([]sqlplugin.ClusterMetadataRow, error) { cluster_metadata.go
88 > var err error
89 > var rows []sqlplugin.ClusterMetadataRow
90 > switch {
91 case len(filter.ClusterName) != 0:
92 err = pdb.SelectContext(ctx,
97 filter.PageSize,
98 )
99 > default: cluster_metadata.go
100 > err = pdb.SelectContext(ctx,
101 > &rows,
102 > listClusterMetadataQry,
103 > constMetadataPartition,
104 > filter.PageSize,
105 > )
106 }
107 > return rows, err cluster_metadata.go
108 }
109
111 ctx context.Context,
112 filter *sqlplugin.ClusterMetadataFilter,
113 > ) (*sqlplugin.ClusterMetadataRow, error) { cluster_metadata.go
114 > var row sqlplugin.ClusterMetadataRow
115 > err := pdb.GetContext(ctx,
116 > &row,
117 > getClusterMetadataQry,
118 > constMetadataPartition,
119 > filter.ClusterName,
120 > )
121 > if err != nil {
122 > return nil, err
123 > }
124 > return &row, err
125 }
126
128 ctx context.Context,
129 filter *sqlplugin.ClusterMetadataFilter,
130 > ) (*sqlplugin.ClusterMetadataRow, error) { cluster_metadata.go
131 > var row sqlplugin.ClusterMetadataRow
132 > err := pdb.GetContext(ctx,
133 > &row,
134 > writeLockGetClusterMetadataQry,
135 > constMetadataPartition,
136 > filter.ClusterName,
137 > )
138 > if err != nil {
139 > return nil, err
140 > }
141 > return &row, nil
142 }
143
145 ctx context.Context,
146 filter *sqlplugin.ClusterMetadataFilter,
147 > ) (sql.Result, error) { cluster_metadata.go
148 >
149 > return pdb.ExecContext(ctx,
150 > deleteClusterMetadataQry,
151 > constMetadataPartition,
152 > filter.ClusterName,
153 > )
154 > }
155
156 func (pdb *db) UpsertClusterMembership(