Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.

Address various issues #19

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deploy/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ modules-prefix=/
# turn these on if you are using the roxy unit tester
# Note: to activate Unit Testing, you must have test-content-db and test-port defined
#
# test-content-db=${app-name}-content-test
# test-modules-db=${app-name}-modules
# test-port=8042
test-content-db=${app-name}-content-test
test-modules-db=${app-name}-modules
test-port=1042
#
# The authentication method used for your test appserver
# application-level, basic, digest, digestbasic
Expand Down
2 changes: 1 addition & 1 deletion deploy/ml-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<range-element-index xmlns="http://marklogic.com/xdmp/database" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<scalar-type>long</scalar-type>
<namespace-uri />
<localname>age</localname>
<localname>age id</localname>
<collation />
<range-value-positions>false</range-value-positions>
<invalid-values>ignore</invalid-values>
Expand Down
2 changes: 1 addition & 1 deletion rest-api/ext/sql.xqy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ declare default function namespace "http://marklogic.com/rest-api/resource/sql";
import module namespace s = "http://marklogic.com/sql" at "/sql.xqy";

(:
: curl -X POST --anyauth -umlsqlhttp-user:mlsqlhttp-password "http://localhost:1040/v1/resources/sql" -H "Content-Type: application/txt" -d @test/rest-api/ext/select.txt
: curl -X POST --anyauth -umlsqlhttp-user:mlsqlhttp-password "http://localhost:1040/v1/resources/sql?rs:format=json" -H "Content-Type: application/txt" -d "select * from person"
:)
declare function post(
$context as map:map,
Expand Down
26 changes: 20 additions & 6 deletions src/ext/parser.sjs
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,10 @@ module.exports = (function () {
return util.textNode(r);
},
peg$c505 = function (n) {
return util.key(n);
/*
* Currently used only for aliases. Should not force to lower-case.
*/
return util.textNode(n);
},
peg$c506 = "]",
peg$c507 = {
Expand Down Expand Up @@ -3535,7 +3538,7 @@ module.exports = (function () {
function peg$computeLocation(startPos, endPos) {
var startPosDetails = peg$computePosDetails(startPos),
endPosDetails = peg$computePosDetails(endPos);

return {
start: {
offset: startPos,
Expand Down Expand Up @@ -7944,7 +7947,15 @@ module.exports = (function () {
}
if (s5 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c175(s1, s3, s5);

if (s5 != null
&& s5.hasOwnProperty("flip")
&& s5.flip) {
s1 = peg$c175(s1, s5, s3);
} else {
s1 = peg$c175(s1, s3, s5);
}

s0 = s1;
} else {
peg$currPos = s0;
Expand Down Expand Up @@ -7987,7 +7998,10 @@ module.exports = (function () {
s2 = peg$parseexpression();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;

var flip = (s1 === ",");
s1 = peg$c177(s1, s2);
s1["flip"] = flip;
s0 = s1;
} else {
peg$currPos = s0;
Expand All @@ -8004,7 +8018,7 @@ module.exports = (function () {
peg$fail(peg$c176);
}
}

return s0;
}

Expand Down Expand Up @@ -9058,7 +9072,7 @@ module.exports = (function () {
peg$fail(peg$c211);
}
}

return s0;
}

Expand Down Expand Up @@ -10086,7 +10100,7 @@ module.exports = (function () {

function peg$parseinsert_values_list() {
var s0, s1, s2, s3, s4;

s0 = peg$currPos;
s1 = peg$parseinsert_values();
if (s1 !== peg$FAILED) {
Expand Down
Loading