Skip to content

Commit

Permalink
Changed query to accept user input in parameterized query
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakrai9185720 committed Nov 4, 2022
1 parent 9ac505d commit 8bc8242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion warehouse/warehouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ func getPendingStagingFileCount(sourceOrDestId string, isSourceId bool) (fileCou
lastStagingFileID,
sourceOrDestColumn,
)
err = dbHandle.QueryRow(sourceOrDestId, sourceOrDestId).Scan(&fileCount)
err = dbHandle.QueryRow(sqlStatement, sourceOrDestId).Scan(&fileCount)
if err != nil && err != sql.ErrNoRows {
err = fmt.Errorf("query: %s run failed with Error : %w", sqlStatement, err)
return
Expand Down

0 comments on commit 8bc8242

Please sign in to comment.