Skip to content

Commit

Permalink
shift: fix bug for unquoted col or table #560
Browse files Browse the repository at this point in the history
[summary]
1. db or table name may include "-", like "a-b_db" or "a-b_tbl"
2. column name may be a keyword, like "char", "key"...
They should be quoted when send delete/update sql to backend.
[test case]
vendor/github.com/radondb/shift/shift_test
[patch codecov]
vendor/github.com/radondb/shift/shift   coverage: 76.1% of statements
  • Loading branch information
hustjieke authored and BohuTANG committed Jan 17, 2020
1 parent 9fcdd0b commit 25970a9
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/vendor/github.com/radondb/shift/shift/delete.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/vendor/github.com/radondb/shift/shift/shift.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions src/vendor/github.com/radondb/shift/shift/shift_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/vendor/github.com/radondb/shift/shift/update.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 25970a9

Please sign in to comment.