-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra whitespace inserted in string concatenation operator #55
Comments
@rhinotake I'm going to fix this. |
I had this problem as well, the formatting inserted extra spaces, and so did the qualifiers |
Raw SQL: select `t1`.`teacher_id` as id, `t1`.`first_name` as firstName, upper(md5(`t1`.`first_name`)) as firstName, (select `t1`.`gender` as gender from `teacher` as `t1` limit 1) as nested1 from `teacher` as `t1` inner join `subject` as `subject` on `t1`.`teacher_id` = `subject`.`teacher_id` or `t1`.`teacher_id` < 1 where `t1`.`teacher_id` != -1 and exists (select `t1`.`gender` as gender from `teacher` as `t1` limit 1) group by `t1`.`teacher_id` limit 0, 10
Formatted SQL: select
` t1 `.` teacher_id ` as id,
` t1 `.` first_name ` as firstName,
upper(md5(` t1 `.` first_name `)) as firstName,
(
select
` t1 `.` gender ` as gender
from
` teacher ` as ` t1 `
limit
1
) as nested1
from
` teacher ` as ` t1 `
inner join ` subject ` as ` subject ` on ` t1 `.` teacher_id ` = ` subject `.` teacher_id `
or ` t1 `.` teacher_id ` < 1
where
` t1 `.` teacher_id ` ! = -1
and exists (
select
` t1 `.` gender ` as gender
from
` teacher ` as ` t1 `
limit
1
)
group by
` t1 `.` teacher_id `
limit
0, 10 |
In Dialect.PostgreSql, when using the string concatenation operator (||), extra whitespace is inserted.
If you run
dialectConfig.plusOperators("||")
, no extra whitespace will be inserted.Similar whitespace will be inserted in Dialect.N1ql and Dialect.TSql.
I can't judge whether the response is appropriate, but after applying the following patch,
plusOperators("||")
is no longer needed.The text was updated successfully, but these errors were encountered: