Commit 1d201bb
authored
fix(databases): use name not description for API alignment (#112)
* fix(databases): use name not description for API alignment
The Hotdata API renamed the database identifier field from `description`
to `name`. This updates:
- `try_resolve_database`: filter by `d.name` instead of `d.description`
so that `hotdata databases get <name>` works against the new API
- `databases set`: accept the database id directly rather than resolving
by name/description — the id is unambiguous and always available
- Error messages and help text: "id or description" → "id or name"
- Tests: update mock payloads to return `name` (not `description`)
* fix(databases): implement dot-notation schema parsing in create_database_request
The --table flag doc comments claimed that `schema.table` entries would land
in the named schema, but the implementation was sending literal strings as
table names inside a single schema. This implements the promised behavior:
entries with a dot are split into (schema, table) and grouped accordingly,
bare names fall back to the --schema default. Adds a test covering the
multi-schema case.
Also removes an extra blank line between resolve_database and schema_name.
* fix(databases): remove stale description field and --description flag
- Drop `description` field from DatabaseSummary, Database, and
CreateDatabaseResponse structs — the API now returns `name` only
- Remove `--description` flag from `databases create` and the
corresponding `"description"` JSON key from create_database_request
- Drop DESCRIPTION column from `databases list` table output
- Remove the always-blank `description: -` row from `databases show`
- `databases set` now resolves the input to a real db.id before saving,
validating the database exists and ensuring the config always holds an ID
- Rename id_or_description params to id_or_name in get/delete/set
- Update all tests and the databases_cli integration test
* fix(databases): reorder list columns to ID then NAME
* fix(databases): set accepts only IDs, rejects names
---------
Co-authored-by: Eddie A Tejeda <669988+eddietejeda@users.noreply.github.com>1 parent bfabb45 commit 1d201bb
4 files changed
Lines changed: 147 additions & 91 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
567 | 570 | | |
568 | | - | |
| 571 | + | |
569 | 572 | | |
570 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
571 | 576 | | |
572 | 577 | | |
573 | 578 | | |
574 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
575 | 582 | | |
576 | 583 | | |
577 | 584 | | |
578 | 585 | | |
579 | | - | |
| 586 | + | |
| 587 | + | |
580 | 588 | | |
581 | 589 | | |
582 | 590 | | |
| |||
587 | 595 | | |
588 | 596 | | |
589 | 597 | | |
590 | | - | |
591 | | - | |
| 598 | + | |
| 599 | + | |
592 | 600 | | |
593 | 601 | | |
594 | 602 | | |
| |||
618 | 626 | | |
619 | 627 | | |
620 | 628 | | |
621 | | - | |
| 629 | + | |
622 | 630 | | |
623 | 631 | | |
624 | 632 | | |
| |||
630 | 638 | | |
631 | 639 | | |
632 | 640 | | |
633 | | - | |
| 641 | + | |
634 | 642 | | |
635 | 643 | | |
636 | 644 | | |
| |||
645 | 653 | | |
646 | 654 | | |
647 | 655 | | |
648 | | - | |
| 656 | + | |
649 | 657 | | |
650 | 658 | | |
651 | 659 | | |
| |||
671 | 679 | | |
672 | 680 | | |
673 | 681 | | |
674 | | - | |
| 682 | + | |
675 | 683 | | |
676 | 684 | | |
677 | 685 | | |
| |||
0 commit comments