use SqlString to format the query
pass the dialect to the formatter