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

Function writeRoutineComment

backend/plugin/schema/pg/metadata_migration.go:1812–1820  ·  view source on GitHub ↗
(out *strings.Builder, routineType, schemaName, signature, name, comment string)

Source from the content-addressed store, hash-verified

1810}
1811
1812func writeRoutineComment(out *strings.Builder, routineType, schemaName, signature, name, comment string) error {
1813 if signature == "" {
1814 signature = name + "()"
1815 }
1816 if _, err := fmt.Fprintf(out, "COMMENT ON %s %s IS '%s';\n\n", routineType, formatQualifiedRoutineSignature(schemaName, signature), escapeSingleQuote(comment)); err != nil {
1817 return err
1818 }
1819 return nil
1820}
1821
1822func writeEnumTypeDiff(out *strings.Builder, enumDiff *schema.EnumTypeDiff) error {
1823 switch enumDiff.Action {

Callers 1

writeProcedureFunction · 0.85

Calls 2

escapeSingleQuoteFunction · 0.85

Tested by

no test coverage detected