Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Version = "dev"
Version is set by the main package during initialization
Functions ¶
func ApplyQueryParams ¶ added in v1.0.1
ApplyQueryParams replaces :param placeholders in query with actual values Supports both :param and $param syntax
func GetAliasMap ¶ added in v1.0.1
GetAliasMap creates a map of path -> alias for non-empty aliases
Types ¶
type DataQL ¶
type DataQL interface {
Run() error
RunStorageOnly() error
RunAndDescribe() error
DescribeAll() error
Close() error
}
DataQL is the main interface for the data query engine
func NewStorageOnly ¶ added in v1.0.1
NewStorageOnly creates a DataQL instance that only uses an existing DuckDB storage file This mode allows querying previously saved data without specifying input files
type FileInput ¶ added in v1.0.1
type FileInput struct {
Path string // File path
Alias string // Optional table alias (empty if not specified)
}
FileInput represents a file path with an optional table alias
func ParseFileInput ¶ added in v1.0.1
ParseFileInput parses a file input string that may contain an alias Format: "path" or "path:alias" Examples:
- "data.csv" -> FileInput{Path: "data.csv", Alias: ""}
- "data.csv:users" -> FileInput{Path: "data.csv", Alias: "users"}
- "/path/to/file.csv:my_table" -> FileInput{Path: "/path/to/file.csv", Alias: "my_table"}
func ParseFileInputs ¶ added in v1.0.1
ParseFileInputs parses multiple file input strings
type ParamError ¶ added in v1.0.1
ParamError represents an error parsing a query parameter
func (*ParamError) Error ¶ added in v1.0.1
func (e *ParamError) Error() string
type Params ¶
type Params struct {
FileInputs []string
DataSourceName string
Delimiter string
Query string
Export string
Type string
Lines int
Collection string
Verbose bool
Quiet bool // Suppress progress bar output
NoSchema bool // Suppress table schema display before query results
InputFormat string // Input format for stdin (csv, json, jsonl, xml, yaml)
Truncate int // Truncate column values longer than N characters (0 = no truncation)
Vertical bool // Display results in vertical format (like MySQL \G)
QueryParams []string // Query parameters in format "name=value"
Cache bool // Enable data caching for faster subsequent queries
CacheDir string // Cache directory path (default: ~/.dataql/cache)
}