MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / ExecSQL

Method ExecSQL

agent/utils/postgresql/client/remote.go:357–369  ·  view source on GitHub ↗
(command string, timeout uint)

Source from the content-addressed store, hash-verified

355}
356
357func (r *Remote) ExecSQL(command string, timeout uint) error {
358 ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second)
359 defer cancel()
360
361 if _, err := r.Client.ExecContext(ctx, command); err != nil {
362 return err
363 }
364 if errors.Is(ctx.Err(), context.DeadlineExceeded) {
365 return buserr.New("ErrExecTimeOut")
366 }
367
368 return nil
369}
370
371func loadImageTag(database string) (string, error) {
372 var db model.Database

Callers 5

CreateMethod · 0.95
CreateUserMethod · 0.95
DeleteMethod · 0.95
ChangePrivilegesMethod · 0.95
ChangePasswordMethod · 0.95

Calls 1

IsMethod · 0.80

Tested by

no test coverage detected