Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: oracle execute error with position info (#11049)
rebelice1aa581a6f0c1
diff --git a/backend/plugin/db/dm/dm.go b/backend/plugin/db/dm/dm.goindex 2308ebcae3..625c0274f7 100644--- a/backend/plugin/db/dm/dm.go+++ b/backend/plugin/db/dm/dm.go@@ -133,7 +133,17 @@ func (driver *Driver) Execute(ctx context.Context, statement string, opts db.ExesqlResult, err := tx.ExecContext(ctx, singleSQL.Text)if err != nil {- return 0, err+ return 0, &db.ErrorWithPosition{+ Err: errors.Wrapf(err, "failed to execute context in a transaction"),+ Start: &storepb.TaskRunResult_Position{+ Line: int32(singleSQL.FirstStatementLine),+ Column: int32(singleSQL.FirstStatementColumn),+ },+ End: &storepb.TaskRunResult_Position{+ Line: int32(singleSQL.LastLine),+ Column: int32(singleSQL.LastColumn),+ },+ }}rowsAffected, err := sqlResult.RowsAffected()if err != nil {diff --git a/backend/plugin/db/obo/obo.go b/backend/plugin/db/obo/obo.goindex 205a45bcfa..43688b3650 100644--- a/backend/plugin/db/obo/obo.go+++ b/backend/plugin/db/obo/obo.go@@ -127,7 +127,17 @@ func (driver *Driver) Execute(ctx context.Context, statement string, opts db.ExesqlResult, err := tx.ExecContext(ctx, singleSQL.Text)if err != nil {- return 0, err+ return 0, &db.ErrorWithPosition{+ Err: errors.Wrapf(err, "failed to execute context in a transaction"),+ Start: &storepb.TaskRunResult_Position{+ Line: int32(singleSQL.FirstStatementLine),+ Column: int32(singleSQL.FirstStatementColumn),+ },+ End: &storepb.TaskRunResult_Position{+ Line: int32(singleSQL.LastLine),+ Column: int32(singleSQL.LastColumn),+ },+ }}rowsAffected, err := sqlResult.RowsAffected()if err != nil {diff --git a/backend/plugin/db/oracle/oracle.go b/backend/plugin/db/oracle/oracle.goindex 663703ab28..49a6cc3aae 100644--- a/backend/plugin/db/oracle/oracle.go+++ b/backend/plugin/db/oracle/oracle.go@@ -149,7 +149,17 @@ func (driver *Driver) Execute(ctx context.Context, statement string, opts db.ExesqlResult, err := tx.ExecContext(ctx, singleSQL.Text)if err != nil {- return 0, err+ return 0, &db.ErrorWithPosition{+ Err: errors.Wrapf(err, "failed to execute context in a transaction"),+ Start: &storepb.TaskRunResult_Position{+ Line: int32(singleSQL.FirstStatementLine),+ Column: int32(singleSQL.FirstStatementColumn),+ },+ End: &storepb.TaskRunResult_Position{+ Line: int32(singleSQL.LastLine),+ Column: int32(singleSQL.LastColumn),+ },+ }}rowsAffected, err := sqlResult.RowsAffected()if err != nil {