* Check if all SQL statements in a multi-statement query are read-only * @param sql The SQL string (possibly containing multiple statements) * @param connectorType The database type to check against * @returns True if all statements are read-only
(sql: string, connectorType: ConnectorType)
| 24 | * @returns True if all statements are read-only |
| 25 | */ |
| 26 | function areAllStatementsReadOnly(sql: string, connectorType: ConnectorType): boolean { |
| 27 | const statements = splitSQLStatements(sql, connectorType); |
| 28 | return statements.every(statement => isReadOnlySQL(statement, connectorType)); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Create an execute_sql tool handler for a specific source |
no test coverage detected