Skip to content

Commit 93c22c6

Browse files
committed
delete constructMetadata fx
1 parent c58881e commit 93c22c6

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

service/policy/db/utils.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@ import (
1010
"google.golang.org/protobuf/encoding/protojson"
1111
)
1212

13-
func constructMetadata(table string, isJSON bool) string {
14-
if table != "" {
15-
table += "."
16-
}
17-
metadata := "JSON_STRIP_NULLS(JSON_BUILD_OBJECT('labels', " + table + "metadata->'labels', 'created_at', " + table + "created_at, 'updated_at', " + table + "updated_at))"
18-
19-
if isJSON {
20-
metadata = "'metadata', " + metadata + ", "
21-
} else {
22-
metadata += " AS metadata"
23-
}
24-
return metadata
25-
}
26-
2713
func unmarshalMetadata(metadataJSON []byte, m *common.Metadata) error {
2814
if metadataJSON != nil {
2915
if err := protojson.Unmarshal(metadataJSON, m); err != nil {

0 commit comments

Comments
 (0)