MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / ExecContext

Method ExecContext

internal/utils/dbs/db.go:151–164  ·  view source on GitHub ↗
(ctx context.Context, query string, args ...any)

Source from the content-addressed store, hash-verified

149}
150
151func (this *DB) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) {
152 // check database status
153 if this.BeginUpdating() {
154 defer this.EndUpdating()
155 } else {
156 return nil, errDBIsClosed
157 }
158
159 if this.enableStat {
160 defer SharedQueryStatManager.AddQuery(query).End()
161 }
162
163 return this.rawDB.ExecContext(ctx, query, args...)
164}
165
166func (this *DB) Exec(query string, args ...any) (sql.Result, error) {
167 // check database status

Callers

nothing calls this directly

Calls 4

BeginUpdatingMethod · 0.95
EndUpdatingMethod · 0.95
AddQueryMethod · 0.80
EndMethod · 0.45

Tested by

no test coverage detected