fabriciofx/cactoos-jdbc

Regex in ParsedSql

Closed this issue · 2 comments

In ParsedSql class you have the following pattern
Pattern find = Pattern.compile("(?<!')(:[\w])(?!')");
Then you use substring(1) from matched strings , maybe it would be better to use this pattern instead
Pattern.compile("(?<!'):([\w]
)(?!')")
And then
while (matcher.find()) {
fields.add(matcher.group(1));
}

Hi @Lollipopster! Sorry for the delay! I've changed the regex in ParsedSql as suggested, but it fails at my SimpleQueryTest. SimpleQueryTest uses ParsedSql.

@Lollipopster As this change can't work fine, I'll close this issue.