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

datatug / datatug-cli / 26884722401
62%

Build:
DEFAULT BRANCH: main
Ran 03 Jun 2026 12:29PM UTC
Jobs 1
Files 275
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

03 Jun 2026 12:28PM UTC coverage: 38.649% (+0.09%) from 38.558%
26884722401

push

github

web-flow
feat(cli): add sqlite3 scan support (#139)

Enable scanning of SQLite databases end-to-end. `datatug scan -D sqlite3
--path <file> --db <id> --env <ENV> -d <project>` now introspects the
database (tables, columns, primary keys) and produces a valid DataTug
project, instead of panicking with "not implemented yet".

The sqlite3 path had never run end-to-end; this fixes the cascade of
defects that blocked it:

- api: enable the sqlite3 case in scanDbCatalog (native sqlite schemer,
  which is pure-Go; the cgo mattn driver is already imported in main.go).
- cli: add a --path flag and build SQLite connection params for -D sqlite3.
- sqliteschema/collections: set DbType to the scanner's "BASE TABLE"/"VIEW"
  vocabulary, set schema to "main", and fix two broken `WHERE type 'x'`
  queries (missing `=`).
- sqliteschema/{indexes,index_columns,constraints}: replace the fake
  MS-SQL/INFORMATION_SCHEMA stubs (which panicked on a nil *sql.DB) with
  safe native empty providers. Index/constraint/FK extraction is a TODO.
- sqliteschema: IsBulkProvider()=false (SQLite has no INFORMATION_SCHEMA;
  metadata is per-table via PRAGMA).
- sqliteschema/records_count: handle empty schema and stop closing a nil
  *sql.Rows when the query errors.
- datatug.ServerRef.Validate: a sqlite3 server (no host/port) was
  unvalidatable due to a fall-through; return nil for the valid case.
- api: don't copy host/port onto the stored sqlite3 ServerRef; set the
  catalog Driver and driver ID when creating a new project.
- cli: save the scanned project via the filestore directly instead of the
  unfinished storage.NewDatatugStore (which panics).

Tests: integration test scanning a temp SQLite DB (tables + columns),
connectionParams unit tests, and a positive ServerRef.Validate case.

Known limitation: the filestore does not yet persist DB models
(saveDbModels is unimplemented for all drivers), so the scanned schema is
not written to disk yet — tracked separately. SQLite index/constraint/FK
... (continued)

12 of 58 new or added lines in 9 files covered. (20.69%)

6 existing lines in 5 files now uncovered.

5528 of 14303 relevant lines covered (38.65%)

0.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
0.0
0.0% pkg/schemers/sqliteschema/collections.go
9
5.56
5.56% pkg/api/scan_db_schema_api.go
9
0.0
0.0% pkg/schemers/sqliteschema/records_count.go
5
41.43
2.54% apps/datatugapp/commands/cmd_scan_db.go
3
0.0
0.0% pkg/schemers/sqliteschema/constraints.go
3
0.0
0.0% pkg/schemers/sqliteschema/index_columns.go
3
0.0
0.0% pkg/schemers/sqliteschema/indexes.go
3
54.55
-5.45% pkg/schemers/sqliteschema/schema.go

Coverage Regressions

Lines Coverage ∆ File
2
41.43
2.54% apps/datatugapp/commands/cmd_scan_db.go
1
0.0
0.0% pkg/schemers/sqliteschema/constraints.go
1
0.0
0.0% pkg/schemers/sqliteschema/index_columns.go
1
0.0
0.0% pkg/schemers/sqliteschema/indexes.go
1
54.55
-5.45% pkg/schemers/sqliteschema/schema.go
Jobs
ID Job ID Ran Files Coverage
1 26884722401.1 03 Jun 2026 12:29PM UTC 275
38.65
GitHub Action Run
Source Files on build 26884722401
  • Tree
  • List 275
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 032872a2 on github
  • Prev Build on main (#26883351596)
  • Next Build on main (#26886208568)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc