Skip to content
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

Add ON CLUSTER {cluster} support for clickhouse queries #1053

Closed

Conversation

jeromer
Copy link

@jeromer jeromer commented Mar 13, 2024

This add support for ON CLUSTER queries. This will replace any ON CLUSTER {cluster} string in a sql query by ON CLUSTER <clusterName that was provided in x-cluster-name>. Replacing the {cluster} string has been chosen has this looks like a clickhouse macro that can be used somewhere else in CREATE queries for example. This way it's consistent with the rest. The drawback is that this may mislead some users as they might think this is a macro that can be replace by clickhouse directly but it's not (unfortunately).

All tests pass:

ok      github.com/golang-migrate/migrate/v4/database/clickhouse        75.558s

@jeromer jeromer closed this Mar 15, 2024
@jeromer
Copy link
Author

jeromer commented Mar 15, 2024

Useless pull request after all.

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.

None yet

1 participant