We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5de56b6 commit cd4a90aCopy full SHA for cd4a90a
oracle/query.go
@@ -46,9 +46,9 @@ import (
46
)
47
48
// Identifies the table name alias provided as
49
-// "\"users\" \"u\"" and "\"users\" u". Gorm already handles
+// "\"users\" \"u\"" and "\"users\" u" and "\"users\"". Gorm already handles
50
// the other formats like "users u", "users AS u" etc.
51
-var tableRegexp = regexp.MustCompile(`^"(\w+)"\s+"?(\w+)"?$`)
+var tableRegexp = regexp.MustCompile(`^"(\w+)"(?:\s+"?(\w+)"?)?$`)
52
53
func BeforeQuery(db *gorm.DB) {
54
if db == nil || db.Statement == nil || db.Statement.TableExpr == nil {
@@ -64,6 +64,7 @@ func BeforeQuery(db *gorm.DB) {
64
}
65
66
67
+ return
68
69
70
// MismatchedCaseHandler handles Oracle Case Insensitivity.
0 commit comments