Skip to content
Snippets Groups Projects
Verified Commit 9b792fe5 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: handle quotations in select queries

parent 99dc8970
No related branches found
No related tags found
2 merge requests!66REL: prepare release 0.8.0,!59F query quotation
Pipeline #15532 passed
......@@ -98,8 +98,14 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac
/** No parsing, just sets the selector string. */
public Selection(final String selector) {
if (selector.trim().startsWith("'") && selector.trim().endsWith("'")) {
this.selector = selector.replaceFirst("^\\s*'", "").replaceFirst("'\\s*$", "").trim();
} else if (selector.trim().startsWith("\"") && selector.trim().endsWith("\"")) {
this.selector = selector.replaceFirst("^\\s*\"", "").replaceFirst("\"\\s*$", "").trim();
} else {
this.selector = selector.trim();
}
}
public String getSelector() {
return this.selector;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment