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

Function omniTableRefTriple

backend/plugin/parser/tsql/resource_change.go:179–192  ·  view source on GitHub ↗
(ref *ast.TableRef, defaultDatabase, defaultSchema string)

Source from the content-addressed store, hash-verified

177}
178
179func omniTableRefTriple(ref *ast.TableRef, defaultDatabase, defaultSchema string) (string, string, string) {
180 if ref == nil {
181 return defaultDatabase, defaultSchema, ""
182 }
183 db := ref.Database
184 if db == "" {
185 db = defaultDatabase
186 }
187 schema := ref.Schema
188 if schema == "" {
189 schema = defaultSchema
190 }
191 return db, schema, ref.Object
192}
193
194func trimStatement(statement string) string {
195 return strings.TrimLeftFunc(strings.TrimRightFunc(statement, utils.IsSpaceOrSemicolon), unicode.IsSpace) + ";"

Callers 1

extractChangedResourcesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected