2023-04-19 08:28:09 +03:00
|
|
|
// Package flag holds CLI flags.
|
|
|
|
package flag
|
|
|
|
|
|
|
|
const (
|
|
|
|
ActiveSrc = "src"
|
|
|
|
ActiveSrcUsage = "Override the active source for this query"
|
|
|
|
|
2023-05-01 06:59:34 +03:00
|
|
|
ConfigSrc = "src"
|
|
|
|
ConfigSrcUsage = "Config for source"
|
|
|
|
|
2023-04-19 08:28:09 +03:00
|
|
|
CSV = "csv"
|
|
|
|
CSVShort = "c"
|
|
|
|
CSVUsage = "Output CSV"
|
|
|
|
|
|
|
|
Driver = "driver"
|
|
|
|
DriverShort = "d"
|
|
|
|
DriverUsage = "Explicitly specify the data source driver to use"
|
|
|
|
|
|
|
|
HTML = "html"
|
|
|
|
HTMLUsage = "Output HTML table"
|
|
|
|
|
|
|
|
Header = "header"
|
|
|
|
HeaderShort = "h"
|
2023-04-26 18:16:42 +03:00
|
|
|
HeaderUsage = "Print header row"
|
|
|
|
|
|
|
|
NoHeader = "no-header"
|
|
|
|
NoHeaderShort = "H"
|
|
|
|
NoHeaderUsage = "Don't print header row"
|
2023-04-19 08:28:09 +03:00
|
|
|
|
|
|
|
Handle = "handle"
|
|
|
|
HandleShort = "h"
|
|
|
|
HandleUsage = "Handle for the source"
|
|
|
|
|
|
|
|
ListGroup = "group"
|
|
|
|
ListGroupShort = "g"
|
|
|
|
ListGroupUsage = "List groups instead of sources"
|
|
|
|
|
|
|
|
Help = "help"
|
|
|
|
|
|
|
|
Insert = "insert"
|
|
|
|
InsertUsage = "Insert query results into @HANDLE.TABLE. If not existing, TABLE will be created."
|
|
|
|
|
|
|
|
JSON = "json"
|
|
|
|
JSONShort = "j"
|
|
|
|
JSONUsage = "Output JSON"
|
|
|
|
JSONA = "jsona"
|
|
|
|
JSONAShort = "A"
|
|
|
|
JSONAUsage = "Output LF-delimited JSON arrays"
|
|
|
|
JSONL = "jsonl"
|
|
|
|
JSONLShort = "l"
|
|
|
|
JSONLUsage = "Output LF-delimited JSON objects"
|
|
|
|
|
|
|
|
Markdown = "md"
|
|
|
|
MarkdownUsage = "Output Markdown"
|
|
|
|
|
|
|
|
AddActive = "active"
|
|
|
|
AddActiveShort = "a"
|
|
|
|
AddActiveUsage = "Make this the active source"
|
|
|
|
|
|
|
|
Monochrome = "monochrome"
|
|
|
|
MonochromeShort = "M"
|
|
|
|
MonochromeUsage = "Don't colorize output"
|
|
|
|
|
|
|
|
Output = "output"
|
|
|
|
OutputShort = "o"
|
|
|
|
OutputUsage = "Write output to <file> instead of stdout"
|
|
|
|
|
|
|
|
PasswordPrompt = "password"
|
|
|
|
PasswordPromptShort = "p"
|
|
|
|
PasswordPromptUsage = "Read password from stdin or prompt"
|
|
|
|
|
|
|
|
Pretty = "pretty"
|
|
|
|
PrettyUsage = "Pretty-print output"
|
|
|
|
|
|
|
|
QueryDriverUsage = "Explicitly specify the data source driver to use when piping input"
|
|
|
|
QuerySrcOptionsUsage = "Driver-dependent data source options when piping input"
|
|
|
|
|
|
|
|
Raw = "raw"
|
|
|
|
RawShort = "r"
|
|
|
|
RawUsage = "Output each record field in raw format without any encoding or delimiter"
|
|
|
|
|
|
|
|
SQLExec = "exec"
|
|
|
|
SQLExecUsage = "Execute the SQL as a statement (as opposed to query)"
|
|
|
|
|
|
|
|
SQLQuery = "query"
|
|
|
|
SQLQueryUsage = "Execute the SQL as a query (as opposed to statement)"
|
|
|
|
|
2023-04-26 18:16:42 +03:00
|
|
|
// SrcOptions is deprecated.
|
|
|
|
//
|
|
|
|
// //Deprecated: Use specific options like flag.IngestHeader.
|
2023-04-19 08:28:09 +03:00
|
|
|
SrcOptions = "opts"
|
|
|
|
SrcOptionsUsage = "Driver-dependent data source options"
|
|
|
|
|
|
|
|
TSV = "tsv"
|
|
|
|
TSVShort = "T"
|
|
|
|
TSVUsage = "Output TSV"
|
|
|
|
|
|
|
|
Table = "table" // TODO: Rename "table" to "text" (output is not always a table).
|
|
|
|
|
|
|
|
TableShort = "t"
|
|
|
|
TableUsage = "Output text table"
|
|
|
|
|
|
|
|
TblData = "data"
|
|
|
|
TblDataUsage = "Copy table data"
|
|
|
|
|
|
|
|
PingTimeout = "timeout"
|
|
|
|
PingTimeoutUsage = "Max time to wait for ping"
|
|
|
|
|
|
|
|
Verbose = "verbose"
|
|
|
|
VerboseShort = "v"
|
|
|
|
VerboseUsage = "Verbose output"
|
|
|
|
|
|
|
|
Version = "version"
|
|
|
|
VersionUsage = "Print version info"
|
|
|
|
|
|
|
|
XLSX = "xlsx"
|
|
|
|
XLSXShort = "x"
|
|
|
|
XLSXUsage = "Output Excel XLSX"
|
|
|
|
|
|
|
|
YAML = "yaml"
|
|
|
|
YAMLShort = "y"
|
|
|
|
YAMLUsage = "Output YAML"
|
|
|
|
|
|
|
|
XML = "xml"
|
|
|
|
XMLShort = "X"
|
|
|
|
XMLUsage = "Output XML"
|
|
|
|
|
|
|
|
SkipVerify = "skip-verify"
|
|
|
|
SkipVerifyUsage = "Don't ping source before adding it"
|
|
|
|
|
|
|
|
Arg = "arg"
|
|
|
|
ArgUsage = "Set a string value to a variable"
|
|
|
|
|
|
|
|
Config = "config"
|
2023-04-23 01:31:28 +03:00
|
|
|
ConfigUsage = "Load config from here"
|
2023-04-26 18:16:42 +03:00
|
|
|
|
|
|
|
IngestHeader = "ingest.header"
|
|
|
|
IngestHeaderUsage = "Treat first row of import data as header"
|
|
|
|
|
|
|
|
CSVEmptyAsNull = "driver.csv.empty-as-null"
|
|
|
|
CSVEmptyAsNullUsage = "Treat empty CSV fields as null"
|
|
|
|
|
|
|
|
CSVDelim = "driver.csv.delim"
|
|
|
|
CSVDelimUsage = "CSV delimiter: one of comma, space, pipe, tab, colon, semi, period"
|
|
|
|
CSVDelimDefault = "comma"
|
2023-05-01 06:59:34 +03:00
|
|
|
|
|
|
|
ConfigSetDelete = "delete"
|
|
|
|
ConfigSetDeleteShort = "D"
|
|
|
|
ConfigSetDeleteUsage = "Unset this option"
|
2023-04-19 08:28:09 +03:00
|
|
|
)
|