allowed-keywords.ts•613 B
import { ConnectorType } from "../connectors/interface.js";
/**
* List of allowed keywords for SQL queries
* Not only SELECT queries are allowed,
* but also other queries that are not destructive
*/
export const allowedKeywords: Record<ConnectorType, string[]> = {
postgres: ["select", "with", "explain", "analyze", "show"],
mysql: ["select", "with", "explain", "analyze", "show", "describe", "desc"],
mariadb: ["select", "with", "explain", "analyze", "show", "describe", "desc"],
sqlite: ["select", "with", "explain", "analyze", "pragma"],
sqlserver: ["select", "with", "explain", "showplan"],
};