MCPcopy Index your code
hub / github.com/bytebase/bytebase / LogTransactionControl

Method LogTransactionControl

backend/plugin/db/driver.go:370–384  ·  view source on GitHub ↗
(t storepb.TaskRunLog_TransactionControl_Type, rerr string)

Source from the content-addressed store, hash-verified

368}
369
370func (o *ExecuteOptions) LogTransactionControl(t storepb.TaskRunLog_TransactionControl_Type, rerr string) {
371 if o == nil || o.CreateTaskRunLog == nil {
372 return
373 }
374 err := o.CreateTaskRunLog(time.Now(), &storepb.TaskRunLog{
375 Type: storepb.TaskRunLog_TRANSACTION_CONTROL,
376 TransactionControl: &storepb.TaskRunLog_TransactionControl{
377 Type: t,
378 Error: rerr,
379 },
380 })
381 if err != nil {
382 slog.Warn("failed to log command transaction control", log.BBError(err))
383 }
384}

Calls 2

BBErrorFunction · 0.92
CreateTaskRunLogMethod · 0.80

Tested by

no test coverage detected