MCPcopy Index your code
hub / github.com/bytebase/dbhub / isSelectQuery

Method isSelectQuery

src/utils/sql-row-limiter.ts:11–14  ·  view source on GitHub ↗

* Check if a SQL statement is a SELECT query that can benefit from row limiting * Only handles SELECT queries

(sql: string)

Source from the content-addressed store, hash-verified

9 * Only handles SELECT queries
10 */
11 static isSelectQuery(sql: string): boolean {
12 const trimmed = sql.trim().toLowerCase();
13 return trimmed.startsWith('select');
14 }
15
16 /**
17 * Check if a SQL statement already has a LIMIT clause.

Callers 2

applyMaxRowsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected