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

Function TrimStatement

backend/plugin/db/util/driverutil.go:206–208  ·  view source on GitHub ↗

TrimStatement trims the unused characters from the statement for making getStatementWithResultLimit() happy.

(statement string)

Source from the content-addressed store, hash-verified

204
205// TrimStatement trims the unused characters from the statement for making getStatementWithResultLimit() happy.
206func TrimStatement(statement string) string {
207 return strings.TrimLeftFunc(strings.TrimRightFunc(statement, utils.IsSpaceOrSemicolon), unicode.IsSpace)
208}
209
210func MySQLPrependBytebaseAppComment(statement string) string {
211 return fmt.Sprintf("/*app=bytebase*/ %s", statement)

Callers 13

toStringMethod · 0.92
addLimitFor11gFunction · 0.92
QueryConnMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected