sqlite escapes wrongly if you need all columns from specific table #1780

Closed
opened 1 year ago by lafriks · 2 comments
lafriks commented 1 year ago
Collaborator

If you specify:

  .Cols("`table1`.*, `table2`.id")

xorm would generate select for sqlite:

SELECT `table1`.`*`, `table2`.`id` FROM ...

that is invalid SQL. Correct would be:

SELECT `table1`.*, `table2`.`id` FROM ...
If you specify: ```go .Cols("`table1`.*, `table2`.id") ``` xorm would generate select for sqlite: ```sql SELECT `table1`.`*`, `table2`.`id` FROM ... ``` that is invalid SQL. Correct would be: ```sql SELECT `table1`.*, `table2`.`id` FROM ... ```
lafriks added the
kind/bug
label 1 year ago
lafriks added
invalid
and removed
kind/bug
labels 1 year ago
Poster
Collaborator

Can not reproduce it anymore. Looks like in latest it is already fixed

Can not reproduce it anymore. Looks like in latest it is already fixed
lafriks added
kind/bug
and removed
invalid
labels 1 year ago
Poster
Collaborator

Sry, managed to reproduce :)

Sry, managed to reproduce :)
lunny added this to the 1.0.5 milestone 1 year ago
lunny closed this issue 1 year ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.