output

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package output formats query results as JSONL, CSV, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrowToGo

func ArrowToGo(batch arrow.RecordBatch) []map[string]any

ArrowToGo converts an Arrow record batch to a slice of maps.

func WriteResult

func WriteResult(w io.Writer, qr result.QueryResult, format string) (int, error)

WriteResult writes query results to w in the specified format.

Types

type ResultFormatter

type ResultFormatter interface {
	Header(names []string) error
	Rows(batch arrow.RecordBatch) error
	Footer() error
}

ResultFormatter writes query results in a specific format.

func NewFormatter

func NewFormatter(w io.Writer, format string) (ResultFormatter, error)

NewFormatter creates a ResultFormatter for the specified format.

Jump to

Keyboard shortcuts

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