Skip to content

no-select-star

Prefer explicit column projections over SELECT * in embedded SQL.

Why

Wildcard projections couple row shape and query cost to unrelated schema changes.

Fix

List every required column explicitly in the projection.

Examples

Before — flagged Do not select every column
src/runs.ts
db.prepare(`SELECT * FROM runs`).all();
After — preferred Select the required columns
src/runs.ts
db.prepare(`SELECT id, status FROM runs`).all();