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

Function scanBracketQuotedIdentifier

src/utils/sql-parser.ts:130–139  ·  view source on GitHub ↗
(sql: string, i: number)

Source from the content-addressed store, hash-verified

128}
129
130function scanBracketQuotedIdentifier(sql: string, i: number): SQLToken | null {
131 if (sql[i] !== "[") { return null; }
132 let j = i + 1;
133 while (j < sql.length) {
134 if (sql[j] === "]" && sql[j + 1] === "]") { j += 2; }
135 else if (sql[j] === "]") { j++; break; }
136 else { j++; }
137 }
138 return { type: TokenType.QuotedBlock, end: j };
139}
140
141function scanTokenAnsi(sql: string, i: number): SQLToken {
142 return scanSingleLineComment(sql, i)

Callers 2

scanTokenSQLiteFunction · 0.85
scanTokenSQLServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected