You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(oracle): enable DML operations and resolve incorrect array type error (googleapis#2323)
This pull request resolves an issue where executing DML statements
(UPDATE, INSERT, DELETE) caused "incorrect array type" errors.
Previously, the Oracle source forced all operations to use QueryContext,
expecting rows to be returned. This caused failures when running write
operations that do not return rows.
**Changes Implemented:**
The modification updates the Oracle source and tool definitions to
distinguish between Read-Only (SELECT) and Action (DML) operations.
- **internal/sources/oracle/oracle.go:**
1. Updated RunSQL signature to accept a readOnly boolean.
2. Added conditional logic: If readOnly is false, it now uses
ExecContext and returns rows_affected instead of attempting to scan
non-existent rows.
- **internal/tools/oracle/oraclesql/oraclesql.go:**
1. Added a readonly field to the tool configuration (YAML).
2. Updated the Invoke method to pass this flag to the source. Defaults
to true (Read-Only) for backward compatibility.
🛠️ Fixesgoogleapis#2026
---------
Co-authored-by: Wenxin Du <117315983+duwenxin99@users.noreply.github.com>
0 commit comments