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

SQLTemplateParser#extractAllParameters doesn't support SQLs using non-ascii characters? #967

Open
emag opened this issue Dec 12, 2018 · 1 comment

Comments

@emag
Copy link

emag commented Dec 12, 2018

It looks like SQLTemplateParser#extractAllParameters doesn't work against SQLs contain non-ascii characters.

The following test will fail because the returned params are empty.

it should "support SQL contains non-ascii characters" in {
  val sql = "SELECT * FROM ユーザ WHERE user_id = {id})"
  val params = SQLTemplateParser.extractAllParameters(sql)
  params.size should equal(1)
  params.head should equal('id)
}
@seratch
Copy link
Member

seratch commented Dec 12, 2018

Having multibyte characters in literal expressions like 'ユーザ' is supported but I didn't expect the case that table names can be those.

For now, I don't have strong motivation to work on this. If you need the support for the cases, could you make a pull request?

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

No branches or pull requests

2 participants