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

fixBound is not expanding VALUES correct #772

Open
GeminiZhang6 opened this issue Sep 16, 2021 · 1 comment
Open

fixBound is not expanding VALUES correct #772

GeminiZhang6 opened this issue Sep 16, 2021 · 1 comment

Comments

@GeminiZhang6
Copy link

GeminiZhang6 commented Sep 16, 2021

The code was working in 1.2.1. After updating to 1.3.4, this issue started occurring. (Also doesn't work in 1.3.3 but caused by another error)

Test Query:

SELECT
  a, b
FROM (
  VALUES (:a, :b)
) AS t(a, b);

with loop 2, it outputs the following:

SELECT
  a, b
FROM (
  VALUES (?, ?)
) AS t(a, b);

but it should output something like

SELECT
  a, b
FROM (
  VALUES (?, ?), (?, ?)
) AS t(a, b);

Most likely due to the following regex not matching

var valuesReg = regexp.MustCompile(`\)\s*(?i)VALUES\s*\(`)

image

@slsyy
Copy link

slsyy commented Feb 1, 2022

Same problem. I want to expand values for the same reason as an OP and doc says nothing about required in that case (a, b, c) VALUES (:a, :b, :c) pattern

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