fix issue #448 #1355
No reviewers
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#1355
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "oracle_join"
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?
In xorm implementation, the statement can't know the struct joined in, so use '*' instead of the columns from target struct. But '*' can't be use in a subquery here (https://github.com/go-xorm/xorm/blob/v0.7.4/statement.go#L1160). Check the
columnStr
before use it .Codecov Report
68.05% <0%> (-0.26%)
69.69% <0%> (+1.51%)
Continue to review full report at Codecov.
Could you add some tests?
@lunny
Sure, but it can't be tested in a Golang UnitTest without a Oracle Server. So let me show examples here.
Basic structs:
Demo snippets:
Generate SQL:
current version
This SQL will cause a err from the Oracle Server like "ORA-00923: FROM keyword not found where expected"
with the PR
This SQL works well.
Demo2, normal Query with Limit
Generate SQL
The current version and this PR will generate the same SQL, and works well.
Demo3, normal Query with JOIN
Generate SQL
The current version and this PR will generate the same SQL, and works well.
Thanks!