Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Latest commit

 

History

History
19 lines (12 loc) · 467 Bytes

no-full-sql-request.md

File metadata and controls

19 lines (12 loc) · 467 Bytes

SQL request should not select all fields in a table (no-full-sql-request)

Using SQL requests that select all fields in a table is not efficient and can increase CPU and memory usage.

Rule Details

The rule enforces that no "SELECT * FROM" is used in literals.

Examples of incorrect code for this rule:

var sql = `SELECT * FROM users`;

Examples of correct code for this rule:

var sql = `SELECT username, email, name FROM users`;