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

escape the back quote in raw string literals #36042

Closed
Zheaoli opened this issue Dec 8, 2019 · 2 comments
Closed

escape the back quote in raw string literals #36042

Zheaoli opened this issue Dec 8, 2019 · 2 comments

Comments

@Zheaoli
Copy link

Zheaoli commented Dec 8, 2019

I have read about the raw string literals spec and I got a question

When I want to get a raw string with the backquote like

select 
* 
from `demo` where `demo`.id =1

Is there any change to escape the backquote char in a raw string ?

@agnivade
Copy link
Contributor

agnivade commented Dec 8, 2019

Hello @Zheaoli - the spec says:

Within the quotes, any character may appear except back quote.

So I'm afraid there is no way to escape the backquote character. You will have to do string concatenation. There is a proposal at #32590 which tries to improve some of this.

I will close this issue, but for further questions, please feel free to ask it in any of these forums below:

Thanks

@agnivade agnivade closed this as completed Dec 8, 2019
@Zheaoli
Copy link
Author

Zheaoli commented Dec 8, 2019

@agnivade sorry about this, I have already search on the web. I'm not sure they are right so sorry about this issue

@golang golang locked and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants