Remove dead code from session.SyncWithOptions() #2323

Merged
lunny merged 3 commits from 6543/xorm:remove_dead-code_in_sync into master 2023-09-16 14:41:02 +00:00
Contributor

sync.go Lines 229 to 231 in db7c264062
var oriIndex *schemas.Index
for name2, index2 := range oriTable.Indexes {
if index.Equal(index2) {

as oriIndex only is not nil if index.Equal(index2)

and index.Equal(index2) check if oriIndex.Type == index.Type ... so it always is false

https://gitea.com/xorm/xorm/src/commit/db7c2640627d24539aa4607f50bcba7037ddd9e6/sync.go#L229-L231 as oriIndex only is **not** nil if index.Equal(index2) and index.Equal(index2) check if `oriIndex.Type == index.Type` ... so it always is false
6543 added 1 commit 2023-08-09 16:02:11 +00:00
remove dead code
All checks were successful
test mariadb / test mariadb (pull_request) Successful in 4m52s
test cockroach / test cockroach (pull_request) Successful in 7m37s
test mssql / test mssql (pull_request) Successful in 5m45s
test mysql / test mysql (pull_request) Successful in 4m51s
test mysql8 / test mysql8 (pull_request) Successful in 5m4s
test postgres / test postgres (pull_request) Successful in 5m42s
test tidb / test tidb (pull_request) Successful in 5m33s
test sqlite / unit test & test sqlite (pull_request) Successful in 8m35s
d764facb5f
6543 requested review from lunny 2023-08-09 16:02:20 +00:00
Author
Contributor

@lunny did you had any time to dig into it?

@lunny did you had any time to dig into it?
lunny added 2 commits 2023-09-16 14:06:29 +00:00
Add test
All checks were successful
test mariadb / test mariadb (pull_request) Successful in 4m43s
test cockroach / test cockroach (pull_request) Successful in 6m54s
test mysql / test mysql (pull_request) Successful in 4m57s
test mssql / test mssql (pull_request) Successful in 5m48s
test mysql8 / test mysql8 (pull_request) Successful in 5m14s
test postgres / test postgres (pull_request) Successful in 5m39s
test tidb / test tidb (pull_request) Successful in 5m17s
test sqlite / unit test & test sqlite (pull_request) Successful in 8m15s
66a2adf75f
lunny approved these changes 2023-09-16 14:07:16 +00:00
lunny added the
kind
refactor
label 2023-09-16 14:07:24 +00:00
lunny merged commit e5be0f4129 into master 2023-09-16 14:41:02 +00:00
6543 deleted branch remove_dead-code_in_sync 2023-11-15 22:35:28 +00:00
Sign in to join this conversation.
No description provided.