rawsql-ts
Version:
High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.
27 lines (26 loc) • 853 B
TypeScript
import { BaseTokenReader } from './BaseTokenReader';
import { Lexeme } from '../models/Lexeme';
/**
* Reads SQL parameter tokens (@param, :param, $param, ?, ${param})
*/
export declare class ParameterTokenReader extends BaseTokenReader {
constructor(input: string);
/**
* Try to read a parameter token
*/
tryRead(previous: Lexeme | null): Lexeme | null;
/**
* Check if we're in an array slice context where : should be treated as an operator
* Look backwards for an opening bracket that suggests array access
*/
private isInArraySliceContext;
/**
* Check if the current position starts a PostgreSQL dollar-quoted string
* Patterns: $$ or $tag$
*/
private isDollarQuotedString;
/**
* Check if character is alphanumeric (letter or digit)
*/
private isAlphanumeric;
}