MCPcopy Create free account
hub / github.com/bytebase/bytebase / GetProjectIDQueryHistoryID

Function GetProjectIDQueryHistoryID

backend/common/resource_name.go:108–114  ·  view source on GitHub ↗

GetProjectIDQueryHistoryID returns the project ID and query history ID from a resource name.

(name string)

Source from the content-addressed store, hash-verified

106
107// GetProjectIDQueryHistoryID returns the project ID and query history ID from a resource name.
108func GetProjectIDQueryHistoryID(name string) (string, string, error) {
109 tokens, err := GetNameParentTokens(name, ProjectNamePrefix, QueryHistoryNamePrefix)
110 if err != nil {
111 return "", "", err
112 }
113 return tokens[0], tokens[1], nil
114}
115
116// FormatAccessGrant returns the resource name for an access grant.
117func FormatAccessGrant(projectID string, id string) string {

Callers 2

GetQueryHistoryMethod · 0.92

Calls 1

GetNameParentTokensFunction · 0.70

Tested by 1