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

Function omniTableRef

backend/plugin/parser/mysql/resource_change.go:171–180  ·  view source on GitHub ↗

omniTableRef extracts database and table name from an omni TableRef.

(ref *ast.TableRef, defaultDB string)

Source from the content-addressed store, hash-verified

169
170// omniTableRef extracts database and table name from an omni TableRef.
171func omniTableRef(ref *ast.TableRef, defaultDB string) (string, string) {
172 if ref == nil {
173 return defaultDB, ""
174 }
175 db := ref.Schema
176 if db == "" {
177 db = defaultDB
178 }
179 return db, ref.Name
180}
181
182// extractTableExprs collects schema resources from a slice of TableExpr.
183func extractTableExprs(exprs []ast.TableExpr, defaultDB string) []base.SchemaResource {

Callers 2

extractChangedResourcesFunction · 0.85
extractTableExprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected