MCPcopy Create free account
hub / github.com/bytebase/dbhub / applyMaxRowsForSQLServer

Method applyMaxRowsForSQLServer

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

* Apply maxRows limit to a SELECT query using SQL Server TOP syntax

(sql: string, maxRows: number | undefined)

Source from the content-addressed store, hash-verified

147 * Apply maxRows limit to a SELECT query using SQL Server TOP syntax
148 */
149 static applyMaxRowsForSQLServer(sql: string, maxRows: number | undefined): string {
150 if (!maxRows || !this.isSelectQuery(sql)) {
151 return sql;
152 }
153 return this.applyTopToQuery(sql, maxRows);
154 }
155}

Callers 1

executeSQLMethod · 0.80

Calls 2

isSelectQueryMethod · 0.95
applyTopToQueryMethod · 0.95

Tested by

no test coverage detected