This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed #5 - add ability to read files off of filesystem
fixed #2 - breakpoints working better fixed #1 - added consistent highlighting - added history to console commands - added support for ML < 8
- Loading branch information
1 parent
225f681
commit 8899d29
Showing
39 changed files
with
622 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
declare variable $requestId external; | ||
|
||
dbg:continue($requestId) | ||
dbg:continue(xs:unsignedLong($requestId)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
declare variable $serverId external; | ||
|
||
dbg:disconnect($serverId) | ||
dbg:disconnect(xs:unsignedLong($serverId)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
declare variable $serverId external; | ||
|
||
dbg:connect($serverId) | ||
dbg:connect(xs:unsignedLong($serverId)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
declare variable $requestId external; | ||
|
||
let $request-id := xs:unsignedLong($requestId) | ||
let $expr := dbg:expr($request-id, dbg:breakpoints($request-id)) | ||
let $o := json:object() | ||
let $_ := ( | ||
map:put($o, "uri", $expr/dbg:uri/fn:string()), | ||
map:put($o, "line", $expr/dbg:line/fn:data()), | ||
map:put($o, "statement", $expr/dbg:expr-source/fn:string()) | ||
) | ||
return | ||
xdmp:to-json($o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,30 @@ | ||
import module namespace admin = "http://marklogic.com/xdmp/admin" | ||
at "/MarkLogic/admin.xqy"; | ||
|
||
declare variable $serverId external; | ||
declare variable $uri external; | ||
|
||
declare variable $ml-dir := xdmp:filesystem-filepath('.') || '/Modules'; | ||
|
||
let $modules-db := xdmp:server-modules-database($serverId) | ||
let $server-id := xs:unsignedLong($serverId) | ||
let $config := admin:get-configuration() | ||
let $modules-db := admin:appserver-get-modules-database($config, $server-id) | ||
let $server-root := admin:appserver-get-root($config, $server-id) | ||
return | ||
xdmp:invoke-function(function() { | ||
if ($modules-db = 0) then | ||
if (fn:starts-with($uri, "/MarkLogic/")) then | ||
xdmp:document-get($ml-dir || $uri) | ||
else | ||
fn:doc($uri) | ||
}, | ||
map:new(( | ||
map:entry("isolation", "different-transaction"), | ||
map:entry("database", $modules-db), | ||
map:entry("transactionMode", "update-auto-commit") | ||
))) | ||
xdmp:document-get($server-root || $uri) | ||
else | ||
xdmp:invoke-function(function() { | ||
if (fn:starts-with($uri, "/MarkLogic/")) then | ||
xdmp:document-get($ml-dir || $uri) | ||
else | ||
fn:doc($uri) | ||
}, | ||
<options xmlns="xdmp:eval"> | ||
<isolation>different-transaction</isolation> | ||
<database>{$modules-db}</database> | ||
<transaction-mode>update-auto-commit</transaction-mode> | ||
</options>) |
Oops, something went wrong.