MCPcopy Create free account
hub / github.com/distributedio/titan / TxnCall

Function TxnCall

command/command.go:164–172  ·  view source on GitHub ↗

TxnCall calls a command with transaction, it is used with multi/exec

(ctx *Context, txn *db.Transaction)

Source from the content-addressed store, hash-verified

162
163// TxnCall calls a command with transaction, it is used with multi/exec
164func TxnCall(ctx *Context, txn *db.Transaction) (OnCommit, error) {
165 name := strings.ToLower(ctx.Name)
166 cmd, ok := txnCommands[name]
167 if !ok {
168 return nil, ErrUnKnownCommand(ctx.Name)
169 }
170 feedMonitors(ctx)
171 return cmd(ctx, txn)
172}
173
174// AutoCommit commits to database after run a txn command
175func AutoCommit(cmd TxnCommand) Command {

Callers 1

ExecFunction · 0.85

Calls 2

ErrUnKnownCommandFunction · 0.85
feedMonitorsFunction · 0.85

Tested by

no test coverage detected