rawsql-ts
Version:
[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.
30 lines (29 loc) • 969 B
TypeScript
/**
* SQL operator precedence definitions
* Higher numbers indicate higher precedence (tighter binding)
*/
export declare class OperatorPrecedence {
private static readonly precedenceMap;
/**
* Get the precedence of an operator
* @param operator The operator string
* @returns The precedence number (higher = tighter binding)
*/
static getPrecedence(operator: string): number;
/**
* Check if operator1 has higher or equal precedence than operator2
*/
static hasHigherOrEqualPrecedence(operator1: string, operator2: string): boolean;
/**
* Check if an operator is a logical operator (AND/OR)
*/
static isLogicalOperator(operator: string): boolean;
/**
* Check if an operator is a BETWEEN operator
*/
static isBetweenOperator(operator: string): boolean;
/**
* Check if a string is a comparison operator
*/
static isComparisonOperator(operator: string): boolean;
}