batch

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor struct {
	// contains filtered or unexported fields
}

Executor handles batch mode execution

func NewExecutor

func NewExecutor(options *Options, writer io.Writer) (*Executor, error)

NewExecutor creates a new batch executor

func (*Executor) Close

func (e *Executor) Close() error

Close closes the executor and its resources

func (*Executor) Execute

func (e *Executor) Execute(cql string) error

Execute runs CQL in batch mode

func (*Executor) ExecuteFile

func (e *Executor) ExecuteFile(filename string) error

ExecuteFile executes CQL from a file

func (*Executor) ExecuteStdin

func (e *Executor) ExecuteStdin() error

ExecuteStdin executes CQL from stdin

type Options

type Options struct {
	Execute     string       // CQL to execute directly (-e flag)
	File        string       // CQL file to execute (-f flag)
	Format      OutputFormat // Output format
	NoHeader    bool         // Skip headers in output
	FieldSep    string       // Field separator for CSV
	NoPager     bool         // Disable paging (print all results)
	PageSize    int          // Number of rows per batch for streaming
	ConnOptions ui.ConnectionOptions
}

Options contains batch execution options

type OutputFormat

type OutputFormat string

OutputFormat represents the output format for batch mode

const (
	OutputFormatASCII OutputFormat = "ascii"
	OutputFormatJSON  OutputFormat = "json"
	OutputFormatCSV   OutputFormat = "csv"
	OutputFormatTable OutputFormat = "table" // Default table format
)

Jump to

Keyboard shortcuts

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