cql

package
v0.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package cql contributes the CQL (Cassandra interface) statement family to spanner-mycli through the Feature registration seam (issue #778). It is imported only by the full binary (via internal/mycli/feature/all); the core internal/mycli package does not import it, so github.com/gocql/gocql and github.com/googleapis/go-spanner-cassandra stay off the core import path.

The family is EARLY EXPERIMENTAL: it executes CQL through the Cloud Spanner Cassandra adapter (go-spanner-cassandra), which spins up an in-process proxy bound to the session's Spanner database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Feature

func Feature() mycli.Feature

Feature returns the CQL Feature value. The family contributes a single statement and no variables or flags. Each call constructs fresh def instances, so no state is shared between Feature values (#778 §4.4 session-isolation commitment); the statement itself carries only its own CQL text, so there is no package-level mutable state.

Types

type CQLStatement

type CQLStatement struct {
	mycli.MutationClassifier
	CQL string
}

CQLStatement executes a single CQL statement through the Cloud Spanner Cassandra adapter. It embeds mycli.MutationClassifier (Classify wired in the constructor to the fail-closed first-keyword classifier over its own CQL text) so the READONLY guard can reject mutating CQL statements.

It is deliberately NOT mycli.MarksDetachedCompatible: the Cassandra adapter binds to the session's Spanner database, so CQL cannot run in detached (admin-only, no database) session mode.

func (*CQLStatement) Execute

func (cs *CQLStatement) Execute(ctx context.Context, session *mycli.Session) (result *mycli.Result, err error)

Execute runs the CQL statement and returns the result rows as display strings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL