• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

datatug / datatug-cli / 38853822208
100%

Build:
DEFAULT BRANCH: main
Ran 16 Oct 2026 05:11AM UTC
Jobs 1
Files 526
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Oct 2026 05:03AM UTC coverage: 99.999% (+0.001%) from 99.998%
38853822208

push

github

web-flow
feat(query): describe sources, related tables and column facts in result meta (#411)

Stacked on #409 (result files). This branch contains #409's commits, so review only the commits after it. Once #409 lands, the diff shrinks to this PR's own change.

`meta.json` of `query run --result-id` now says which tables a result reads, which tables can be joined to it, and what each column is:

- `pkg/joinmeta`: `RelationInstances` (moved out of `pkg/chat`; it now records a federated source's database) and `LoadForeignKeySnapshot(ctx, dal.DB, source)`. The snapshot is built on dalgo's `dbschema.ListCollections` and `DescribeCollection`, so it works for any engine whose provider reports schema metadata. It covers columns, primary keys and foreign keys (a key with no referenced fields falls back to the target's primary key), plus which collections are views. It is bounded to 500 collections. `pkg/chat`'s relation and foreign-key types are aliases of these.
- The chat: JOIN discovery opens its source as `query run` does (read-only, and PostgreSQL only behind its preview switch). It uses the new loader and no longer refuses non-SQLite sources. The `CanReadTarget` preflight now compares against the source's default schema instead of `main`. The saved-query parameter lookup uses the new loader too. `LoadSQLiteForeignKeySnapshot` stays only for the SQLite-only result-column enrichment, which also reads SQLite's catalog directly.
- `meta.json`:
  - `participants`: instance, schema, relation, alias, kind, role, and the join type with its ON pairs. Federated participants carry their own `datatug://` reference.
  - `related`: from `DiscoverJoinCandidates` per database, with no permission filtering. Each entry has direction, cardinality and field pairs. A join the query already holds is not listed.
  - Per-column facts: `declaredType`, `nullable`, `pk`, `source` and `foreignKeys`. A column's data type follows its declared type when every value fits it.
  - `unavailable` r... (continued)

67071 of 67072 relevant lines covered (100.0%)

1.01 hits per line

Jobs
ID Job ID Ran Files Coverage
1 38853822208.1 16 Oct 2026 05:11AM UTC 526
100.0
GitHub Action Run
Source Files on build 38853822208
  • Tree
  • List 526
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c968031f on github
  • Prev Build on main (#38851712648)
  • Next Build on main (#38854572584)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc