MCPcopy Create free account
hub / github.com/apache/devlake / Exec

Method Exec

backend/impls/dalgorm/dalgorm.go:141–147  ·  view source on GitHub ↗

Exec executes raw sql query

(query string, params ...interface{})

Source from the content-addressed store, hash-verified

139
140// Exec executes raw sql query
141func (d *Dalgorm) Exec(query string, params ...interface{}) errors.Error {
142 err := validateQuery(query)
143 if err != nil {
144 return err
145 }
146 return d.convertGormError(d.db.Exec(query, transformParams(params)...).Error)
147}
148
149var txPattern = regexp.MustCompile(`(?i)^[\s;]*(begin|(start\s+transaction))[\s;]*$`)
150

Callers 4

AddColumnMethod · 0.95
DropColumnsMethod · 0.95
RenameColumnMethod · 0.95
ModifyColumnTypeMethod · 0.95

Calls 4

convertGormErrorMethod · 0.95
validateQueryFunction · 0.85
transformParamsFunction · 0.85
ExecMethod · 0.65

Tested by

no test coverage detected