Major version update. Major bugfixes. Security vulnerabilites fixed

This commit is contained in:
2026-10-14 03:02:07 +01:00
parent 4e47bd8ce0
commit 7c095f6f16
112 changed files with 2479 additions and 1219 deletions
+30
View File
@@ -0,0 +1,30 @@
import { SQlComparisons, ServerQueryOperators } from "../types";
declare const JOIN_TYPES: readonly ["INNER JOIN", "JOIN", "LEFT JOIN", "RIGHT JOIN"];
/**
* # Validate a bare SQL identifier (table, column, alias)
* @description Identifiers can't be bound as parameters, so anything that
* gets interpolated into SQL must pass this check first.
*/
export declare function sqlIdent(name: unknown, label?: string): string;
/**
* # Validate a column reference
* @description Accepts `field`, `table.field` or `table.*`
*/
export declare function sqlField(name: unknown, label?: string): string;
/**
* # Quote an identifier for DDL statements
*/
export declare function sqlQuoteIdent(name: string): string;
/**
* # Quote a string literal
*/
export declare function sqlStringLiteral(value: string): string;
/**
* # Validate a non-negative integer (LIMIT, OFFSET, page)
*/
export declare function sqlInt(value: unknown, label?: string): number;
export declare function sqlOrderStrategy(strategy: unknown): "ASC" | "DESC";
export declare function sqlOperator(operator: unknown, fallback?: (typeof ServerQueryOperators)[number]): (typeof ServerQueryOperators)[number];
export declare function sqlRawEquality(equality: unknown): (typeof SQlComparisons)[number];
export declare function sqlJoinType(joinType: unknown): (typeof JOIN_TYPES)[number];
export {};