Skip to content

Commit

Permalink
Fix MySQL Query Generation for Select Query Not escaped
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitM-IN committed Jun 8, 2024
1 parent bcf9218 commit 401aeeb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/QueryGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,12 @@ public string GenerateSelectQuery<T>(string tableName, List<string> ListOfColumn
tableName = GetTableName<T>();
}

var excapedColumns = ListOfColumns.Select(c => EscapeColumn(c)).ToList();

return _template.SelectTemplate.Render(new TemplateContext(new
{
TableName = tableName,
Columns = ListOfColumns
Columns = excapedColumns
}));

}
Expand Down

0 comments on commit 401aeeb

Please sign in to comment.