oracle使用bug,字段名、表名 不应该用双引号 #265
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#265
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
oracle使用时字段名、表名 不应该用双引号
github.com/go-xorm/xorm/oracle_dialect.go
SELECT user_code, user_name FROM ext_dpt_usr 直接这样就可以的。
func (db *oracle) Quote(name string) string {
return name
}
func (db *oracle) QuoteStr() string {
return ""
}
不应该吗?
不应该,加了没法运行。
select user_name from EXT_DPT_USR t 可以执行
select "user_name" from EXT_DPT_USR t 不能执行,
如下所示
是不是要所有的都加引号就可以?
@lunny 不行的,不能加引号。我使用的pl/sql测试的。
我可以确认.
它不工作来运行查询
它的工作原理如果我改变代码如上所示
Oracle 版 "Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production"
我可以打开拉请求
对不起,我不会说中文
我正在使用谷歌翻译
Which quotes should oracle use? I think it's ready to resolve this issue since dialect's
QuoteStr
has been removed. @BetaCat0Oracle uses double quote but if you use quotes you should capitalize identifiers. "USER_NAME" instead of "user_name". If you don't use quotes then oracle automatically capitalizes identifiers.
Please fix bug with quotes. Current version (with square brackets) don't work either.
P.S. Oracle keeps all objects names (and column names) in uppercase.