-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic (index out of range) while performing a select query #363
Comments
I fix in next release |
there is an issue related to
table name is surround with back quote
so table doesn't drop |
Yes, I forked the xorm library and made the following changes: diff --git a/dialects/oracle.go b/dialects/oracle.go
index 72c26ce..b0c5c38 100644
--- a/dialects/oracle.go
+++ b/dialects/oracle.go
@@ -609,7 +609,7 @@ func (db *oracle) IsReserved(name string) bool {
}
func (db *oracle) DropTableSQL(tableName string) (string, bool) {
- return fmt.Sprintf("DROP TABLE `%s`", tableName), false
+ return fmt.Sprintf("DROP TABLE \"%s\"", tableName), false
}
func (db *oracle) CreateTableSQL(ctx context.Context, queryer core.Queryer, table *schemas.Table, tableName string) (string, bool, error) {
@@ -645,6 +645,10 @@ func (db *oracle) CreateTableSQL(ctx context.Context, queryer core.Queryer, tabl
return sql, false, nil
}
+func (db *oracle) IsSequenceExist(ctx context.Context, queryer core.Queryer, seqName string) (bool, error) {
+ return db.HasRecords(queryer, ctx, `SELECT sequence_name FROM user_sequences WHERE sequence_name = :1`, seqName)
+}
+
func (db *oracle) SetQuotePolicy(quotePolicy QuotePolicy) {
switch quotePolicy {
case QuotePolicyNone:
|
fixed in v2.7.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am getting an index out of range panic while performing a select for update query using go-ora with the xorm library.
I am using:
Panic details
POC that reproduces the error
Thanks!
Edit: also tested with 2.7.5, same error.
The text was updated successfully, but these errors were encountered: