MCPcopy Create free account
hub / github.com/datastax/cql-proxy / execute

Method execute

proxy/proxy.go:620–639  ·  view source on GitHub ↗
(raw *frame.RawFrame, state idempotentState, isSelect bool, keyspace string, body *frame.Body)

Source from the content-addressed store, hash-verified

618}
619
620func (c *client) execute(raw *frame.RawFrame, state idempotentState, isSelect bool, keyspace string, body *frame.Body) {
621 if sess, err := c.proxy.findSession(raw.Header.Version, c.keyspace, c.compression); err == nil {
622 req := &request{
623 client: c,
624 session: sess,
625 state: state,
626 msg: body.Message,
627 keyspace: keyspace,
628 done: false,
629 stream: raw.Header.StreamId,
630 version: raw.Header.Version,
631 qp: c.proxy.newQueryPlan(),
632 frm: c.maybeOverrideUnsupportedWriteConsistency(isSelect, raw, body),
633 isSelect: isSelect,
634 }
635 req.Execute(true)
636 } else {
637 c.send(raw.Header, &message.ServerError{ErrorMessage: "Attempted to use invalid keyspace"})
638 }
639}
640
641func (c *client) handlePrepare(raw *frame.RawFrame, msg *message.Prepare, body *frame.Body) {
642 c.proxy.logger.Debug("handling prepare", zap.String("query", msg.Query), zap.Int16("stream", raw.Header.StreamId))

Callers 4

ReceiveMethod · 0.95
handlePrepareMethod · 0.95
handleExecuteMethod · 0.95
handleQueryMethod · 0.95

Calls 5

ExecuteMethod · 0.95
sendMethod · 0.95
findSessionMethod · 0.80
newQueryPlanMethod · 0.80

Tested by

no test coverage detected