MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / stmtTypeName

Function stmtTypeName

integrations/gorm/plugin.go:177–190  ·  view source on GitHub ↗

stmtTypeName returns a human-readable SQL statement type name.

(stmt ast.Statement)

Source from the content-addressed store, hash-verified

175
176// stmtTypeName returns a human-readable SQL statement type name.
177func stmtTypeName(stmt ast.Statement) string {
178 switch stmt.(type) {
179 case *ast.SelectStatement:
180 return "SELECT"
181 case *ast.InsertStatement:
182 return "INSERT"
183 case *ast.UpdateStatement:
184 return "UPDATE"
185 case *ast.DeleteStatement:
186 return "DELETE"
187 default:
188 return "OTHER"
189 }
190}

Callers 1

afterStatementMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected