You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(drivers): check rows.Err() after Next() loops in all drivers
Same bug pattern as the bind() fix: rows.Next() loops in driver
schema introspection functions did not check rows.Err() afterward.
Per the database/sql contract, Next() returns false both when the
result set is exhausted and when an error occurs — Err() must be
consulted to distinguish the two cases.
Without this check, a connection error during code generation would
silently produce incomplete schema information (missing tables,
columns, or indexes), leading to incorrect generated code.
Affected functions across all four drivers:
- PostgreSQL: TableNames, ViewNames, Columns, loadUniqueColumns
- MySQL: TableNames, ViewNames, Columns
- MSSQL: TableNames, ViewNames, Columns
- SQLite3: TableNames, ViewNames, tableInfo, indexes (nested loops)
0 commit comments