Commit 3f1b8ee
feat(datasets): narrow create to sql/query-id; rename label/table-name (#95)
* feat(databases): migrate to dedicated databases API
* feat(datasets): narrow create to sql/query-id; rename label→description, table-name→name
* Remove dead upload code from datasets; fix create signatures
After the create rework removed --file/--upload-id/--url paths, the upload
infrastructure (FileType, detect_from_bytes/path, stdin_redirect_filename,
make_progress_bar, do_upload, upload_from_file/stdin, create_from_upload,
create_from_url) was left as dead code. Remove it.
Also align create_from_query/create_from_saved_query with the new CLI:
- `name: &str` (required, was Option<&str>)
- `description: Option<&str>` (optional, was required label)
- create_dataset builds the body with table_name always set, label only when provided
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: describe datasets as derived views in help text
* fix: update error message and unwrap in datasets
- datasets::update now references --description/--name (not the old
--label/--table-name flags that were renamed in this PR)
- replace query_id.unwrap() with unreachable!() to make the clap
invariant explicit rather than silently panicking
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: fall back to --name as label when --description omitted on create
Without this, omitting --description sent no label to the API, which
treats label as required and would return a server-side error.
Also corrects the --name help text example from a qualified
default.public.my_view to just my_view — the API table_name field
expects an unqualified identifier.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor(datasets): rename update() params from label/table_name to description/name
Aligns internal parameter names with the renamed CLI flags introduced in this PR.
The API body keys (label, table_name) remain unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 17059bd commit 3f1b8ee
3 files changed
Lines changed: 40 additions & 370 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
463 | 463 | | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 464 | + | |
477 | 465 | | |
478 | 466 | | |
479 | | - | |
| 467 | + | |
480 | 468 | | |
481 | 469 | | |
482 | 470 | | |
483 | | - | |
| 471 | + | |
484 | 472 | | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | 473 | | |
490 | 474 | | |
491 | | - | |
| 475 | + | |
492 | 476 | | |
493 | 477 | | |
494 | 478 | | |
495 | 479 | | |
496 | 480 | | |
497 | 481 | | |
498 | | - | |
| 482 | + | |
499 | 483 | | |
500 | 484 | | |
501 | 485 | | |
502 | | - | |
| 486 | + | |
503 | 487 | | |
504 | 488 | | |
505 | 489 | | |
| |||
0 commit comments