Skip to content

Commit

Permalink
finalize cte fix for mysql.
Browse files Browse the repository at this point in the history
  • Loading branch information
drizk1 committed Mar 30, 2024
1 parent 322b64e commit 943197f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TidierDB.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function finalize_query(sqlquery::SQLQuery)
"FROM )" => ")" , "SELECT SELECT " => "SELECT ", "SELECT SELECT " => "SELECT ", "DISTINCT SELECT " => "DISTINCT ",
"SELECT SELECT SELECT " => "SELECT ", "PARTITION BY GROUP BY" => "PARTITION BY", "GROUP BY GROUP BY" => "GROUP BY", "HAVING HAVING" => "HAVING", )

if current_sql_mode[] == :postgres || current_sql_mode[] == :duckdb
if current_sql_mode[] == :postgres || current_sql_mode[] == :duckdb || current_sql_mode[] == :mysql
complete_query = replace(complete_query, "\"" => "'", "==" => "=")
end

Expand Down

0 comments on commit 943197f

Please sign in to comment.