MCPcopy Index your code
hub / github.com/bytebase/bytebase / GetFunction

Method GetFunction

backend/store/model/database.go:400–413  ·  view source on GitHub ↗

GetFunction gets the function by name. Note: For overloaded functions, this returns the first match by name only. Use signature-based lookup for precise matching.

(name string)

Source from the content-addressed store, hash-verified

398// Note: For overloaded functions, this returns the first match by name only.
399// Use signature-based lookup for precise matching.
400func (s *SchemaMetadata) GetFunction(name string) *storepb.FunctionMetadata {
401 for _, function := range s.proto.GetFunctions() {
402 if s.isDetailCaseSensitive {
403 if function.Name == name {
404 return function
405 }
406 } else {
407 if strings.EqualFold(function.Name, name) {
408 return function
409 }
410 }
411 }
412 return nil
413}
414
415// GetSequence gets the sequence by name.
416func (s *SchemaMetadata) GetSequence(name string) *storepb.SequenceMetadata {

Callers 3

omniAccessTableExistsMethod · 0.80
SearchObjectMethod · 0.80
SearchObjectMethod · 0.80

Calls 1

GetFunctionsMethod · 0.45

Tested by

no test coverage detected