influx-cli icon indicating copy to clipboard operation
influx-cli copied to clipboard

Support chunked responses for REPL queries

Open candrewlee14 opened this issue 3 years ago • 0 comments

The 1.x InfluxDB CLI supported chunked responses with the command chunked. The 2.x REPL does not yet, but it should. The 2.x docs don't show that this functionality is available, but this code exists in OSS (and similar code in cloud):

// Parse chunk size. Use default if not provided or cannot be parsed
chunked := r.FormValue("chunked") == "true"
chunkSize := DefaultChunkSize
if chunked {
    if n, err := strconv.ParseInt(r.FormValue("chunk_size"), 10, 64); err == nil && int(n) > 0 {
        chunkSize = int(n)
    }
}

Relevant docs page: https://docs.influxdata.com/influxdb/v2.2/query-data/influxql/

candrewlee14 avatar Jun 01 '22 21:06 candrewlee14