Skip to content

new format config for skipping white spaces before and after block pa…#69

Merged
vertical-blank merged 1 commit intovertical-blank:masterfrom
hemlac:master
Apr 4, 2024
Merged

new format config for skipping white spaces before and after block pa…#69
vertical-blank merged 1 commit intovertical-blank:masterfrom
hemlac:master

Conversation

@hemlac
Copy link
Copy Markdown
Contributor

@hemlac hemlac commented Jan 10, 2024

With this new config parameter you are able to skip white spaces before and after block parentheses.
For example
Without this parameter:
CREATE VIEW sakila.v_exampl (customer, phone, title) AS select concat(sakila.customer.last_name,', ',sakila.customer.first_name) AS customer,sakila.address.phone AS phone,sakila.film.title AS title from ((((sakila.rental join sakila.customer on((sakila.rental.customer_id = sakila.customer.customer_id))) join sakila.address on((sakila.customer.address_id = sakila.address.address_id))) join sakila.inventory on((sakila.rental.inventory_id = sakila.inventory.inventory_id))) join sakila.film on((sakila.inventory.film_id = sakila.film.film_id))) where ((sakila.rental.return_date is null) and ((sakila.rental.rental_date + interval sakila.film.rental_duration day) < curdate())) order by sakila.film.title limit 5
Result:
CREATE VIEW sakila.v_exampl (customer, phone, title) AS
select
concat(
sakila.customer.last_name,
', ',
sakila.customer.first_name
) AS customer,
sakila.address.phone AS phone,
sakila.film.title AS title
from
(
(
(
(
sakila.rental
join sakila.customer on(
(
sakila.rental.customer_id = sakila.customer.customer_id
)
)
)
join sakila.address on(
(
sakila.customer.address_id = sakila.address.address_id
)
)
)
join sakila.inventory on(
(
sakila.rental.inventory_id = sakila.inventory.inventory_id
)
)
)
join sakila.film on((sakila.inventory.film_id = sakila.film.film_id))
)
where
(
(sakila.rental.return_date is null)
and (
(
sakila.rental.rental_date + interval sakila.film.rental_duration day
) < curdate()
)
)
order by
sakila.film.title
limit
5

With this new parameter
CREATE VIEW sakila.v_exampl (customer, phone, title) AS
select
concat(sakila.customer.last_name,
', ',
sakila.customer.first_name)AS customer,
sakila.address.phone AS phone,
sakila.film.title AS title
from
((((sakila.rental
join sakila.customer on((sakila.rental.customer_id = sakila.customer.customer_id)))
join sakila.address on((sakila.customer.address_id = sakila.address.address_id)))
join sakila.inventory on((sakila.rental.inventory_id = sakila.inventory.inventory_id)))
join sakila.film on((sakila.inventory.film_id = sakila.film.film_id)))
where
((sakila.rental.return_date is null)
and ((sakila.rental.rental_date + interval sakila.film.rental_duration day)< curdate()))
order by
sakila.film.title
limit
5

@hemlac hemlac marked this pull request as ready for review January 10, 2024 20:58
@hemlac
Copy link
Copy Markdown
Contributor Author

hemlac commented Apr 3, 2024

@vertical-blank could you please review my pull request?

@vertical-blank
Copy link
Copy Markdown
Owner

@hemlac
I am very sorry that I have kept you waiting for so long.

The Github actions were broken and I have fixed it.
Could you please reopen the pull request to check the CI results?

@hemlac hemlac closed this Apr 4, 2024
@hemlac hemlac reopened this Apr 4, 2024
@hemlac
Copy link
Copy Markdown
Contributor Author

hemlac commented Apr 4, 2024

@vertical-blank
done

@vertical-blank
Copy link
Copy Markdown
Owner

LGTM
@hemlac Thanks a lot.

@vertical-blank vertical-blank merged commit 86233c3 into vertical-blank:master Apr 4, 2024
@hemlac
Copy link
Copy Markdown
Contributor Author

hemlac commented Apr 4, 2024

@vertical-blank
thank you too!
can you please create a new release?

@vertical-blank
Copy link
Copy Markdown
Owner

@hemlac
Copy link
Copy Markdown
Contributor Author

hemlac commented Apr 9, 2024

@vertical-blank
Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants