MCPcopy Create free account
hub / github.com/peak/s5cmd / prepareTask

Method prepareTask

command/select.go:389–403  ·  view source on GitHub ↗
(ctx context.Context, client *storage.S3, url *url.URL, resultCh chan<- json.RawMessage)

Source from the content-addressed store, hash-verified

387}
388
389func (s Select) prepareTask(ctx context.Context, client *storage.S3, url *url.URL, resultCh chan<- json.RawMessage) func() error {
390 return func() error {
391 query := &storage.SelectQuery{
392 ExpressionType: "SQL",
393 Expression: s.query,
394 InputFormat: s.inputFormat,
395 InputContentStructure: s.inputStructure,
396 FileHeaderInfo: s.fileHeaderInfo,
397 OutputFormat: s.outputFormat,
398 CompressionType: s.compressionType,
399 }
400
401 return client.Select(ctx, url, query, resultCh)
402 }
403}
404
405func validateSelectCommand(c *cli.Context) error {
406 if c.Args().Len() != 1 {

Callers 1

RunMethod · 0.95

Calls 1

SelectMethod · 0.80

Tested by

no test coverage detected