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

How to disable template engine? #94

Open
Alalaq opened this issue Feb 20, 2024 · 1 comment
Open

How to disable template engine? #94

Alalaq opened this issue Feb 20, 2024 · 1 comment

Comments

@Alalaq
Copy link

Alalaq commented Feb 20, 2024

Im using jackc/tern/migrations and in one of .sql files I do insert with using {{}} to insert parameters later. But (If I understood correctly) due to template engine in this lib sql is ignoring esc characters and that parameters whether being seen like sql functions (which doen't exist) or just saying that I have 'unexpected { in command. What should I do and how can I disable template engine?

@jackc
Copy link
Owner

jackc commented Feb 24, 2024

There is no way to disable the template engine.

It is using the standard Go text/template library. You would need to escape the characters. See https://stackoverflow.com/questions/17641887/how-do-i-escape-and-delimiters-in-go-templates.

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

No branches or pull requests

2 participants