Skip to content

Adopt server-provided connection id for managed-db tables; remove __db_ workaround #169

Description

@eddietejeda

Follow-up — blocked on server change

Tracking issue to revisit the CLI once hotdata-dev/www.hotdata.dev#234 ships. Do not action until the server change lands.

Once the server exposes a real connection id for managed-database tables (preferred: a connection_id/database_id field on each information_schema TableInfo; alternative: db-scoped connections surfaced in connections list), the CLI should adopt it and drop the string-convention workaround.

The server change is additive/backward-compatible, so nothing breaks if this lags — this is cleanup to adopt the improvement, not a forced migration.

Work, by which server option lands

If information_schema gains connection_id/database_id (preferred):

  • Add the field to InfoTable in src/indexes.rs and have scan_connection_id use the row's own id directly.
  • Delete the __db_<suffix>dbid<suffix> reverse-transform and the per-database databases get round-trips introduced by the indexes list (unscoped) misses managed-database indexes #168 stopgap.
  • To read the typed field, bump the hotdata SDK (currently 0.3.1), or switch collect_tables to the untyped seam GET (get_json) with the CLI's own struct to avoid an SDK bump.

If db-scoped connections are instead surfaced in connections list:

  • Verify what key the entries expose — connection_lookup matches on connection name, which may not equal the __db_* label emitted by information_schema. Adjust the matched key accordingly (still a code change).

Acceptance

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions