(opts ExplainOptions)
| 369 | } |
| 370 | |
| 371 | func explainQueryFromOptions(opts ExplainOptions) ExplainQuery { |
| 372 | depth := opts.Depth |
| 373 | if depth <= 0 { |
| 374 | depth = 2 |
| 375 | } |
| 376 | limit := opts.Limit |
| 377 | if limit <= 0 { |
| 378 | limit = 100 |
| 379 | } |
| 380 | return ExplainQuery{Depth: depth, Limit: limit, Cursor: opts.Cursor} |
| 381 | } |
| 382 | |
| 383 | func enrichExplain(db *sql.DB, manifest *ExplainManifest, runID, targetID string, ids map[string]string, depth, limit int) error { |
| 384 | if runID == "" && manifest.Target.Run != "" { |