Skip to content

Commit

Permalink
[feature] A new and improved 'exist:time' XQuery pragma. Backported f…
Browse files Browse the repository at this point in the history
…rom FusionDB
  • Loading branch information
adamretter committed Oct 5, 2023
1 parent bd704b3 commit 1ca1714
Show file tree
Hide file tree
Showing 3 changed files with 487 additions and 32 deletions.
2 changes: 2 additions & 0 deletions exist-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@
<exclude>src/test/java/org/exist/xquery/functions/session/AttributeTest.java</exclude>
<exclude>src/test/java/org/exist/xquery/functions/xmldb/XMLDBAuthenticateTest.java</exclude>
<exclude>src/main/java/org/exist/xquery/functions/util/Eval.java</exclude>
<exclude>src/main/java/org/exist/xquery/pragmas/TimerPragma.java</exclude>
<exclude>src/test/java/org/exist/xquery/util/URIUtilsTest.java</exclude>
<exclude>src/main/java/org/exist/xquery/value/ArrayListValueSequence.java</exclude>
<exclude>src/test/java/org/exist/xquery/value/BifurcanMapTest.java</exclude>
Expand Down Expand Up @@ -862,6 +863,7 @@ The original license statement is also included below.]]></preamble>
<include>src/test/java/org/exist/xquery/functions/session/AttributeTest.java</include>
<include>src/test/java/org/exist/xquery/functions/xmldb/XMLDBAuthenticateTest.java</include>
<include>src/main/java/org/exist/xquery/functions/util/Eval.java</include>
<include>src/main/java/org/exist/xquery/pragmas/TimerPragma.java</include>
<include>src/test/java/org/exist/xquery/util/URIUtilsTest.java</include>
<include>src/main/java/org/exist/xquery/value/ArrayListValueSequence.java</include>
<include>src/test/java/org/exist/xquery/value/BifurcanMapTest.java</include>
Expand Down
6 changes: 4 additions & 2 deletions exist-core/src/main/java/org/exist/xquery/Option.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import org.exist.Namespaces;
import org.exist.dom.QName;

import javax.annotation.Nullable;

/**
* Represents an XQuery option declared via "declare option".
*
Expand Down Expand Up @@ -89,9 +91,9 @@ public static String[] tokenize(final String contents) {
return items;
}

public static String[] parseKeyValuePair(final String s) {
public static @Nullable String[] parseKeyValuePair(final String s) {
final Matcher matcher = pattern.matcher(s);
if(matcher.matches()) {
if (matcher.matches()) {
String value = matcher.group(2);
if(value.charAt(0) == '\'' || value.charAt(0) == '"') {
value = value.substring(1, value.length() - 1);
Expand Down
Loading

0 comments on commit 1ca1714

Please sign in to comment.