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

Function scanBacktickQuotedIdentifier

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

Source from the content-addressed store, hash-verified

117}
118
119function scanBacktickQuotedIdentifier(sql: string, i: number): SQLToken | null {
120 if (sql[i] !== "`") { return null; }
121 let j = i + 1;
122 while (j < sql.length) {
123 if (sql[j] === "`" && sql[j + 1] === "`") { j += 2; }
124 else if (sql[j] === "`") { j++; break; }
125 else { j++; }
126 }
127 return { type: TokenType.QuotedBlock, end: j };
128}
129
130function scanBracketQuotedIdentifier(sql: string, i: number): SQLToken | null {
131 if (sql[i] !== "[") { return null; }

Callers 2

scanTokenMySQLFunction · 0.85
scanTokenSQLiteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected