-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
1,134 additions
and
157 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,4 @@ function printMsg(msg) { | |
} | ||
}; | ||
exports.print = print; | ||
exports.printMsg = printMsg; | ||
exports.printMsg = printMsg; |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* This example has all session options explicitly set. | ||
*/ | ||
var basex = require("../index"); | ||
basex.debug_mode = false; | ||
var client = new basex.Session("localhost", 8900,"admin","admin"); | ||
|
||
/** | ||
* Description | ||
* @method print | ||
* @param {} err | ||
* @param {} reply | ||
* @return | ||
*/ | ||
function print(err, reply) { | ||
if (err) { | ||
console.log("Error: " + err); | ||
} else { | ||
var t2=new Date(); | ||
console.log("Execution completed in ",t2-t0," milliseconds."); | ||
console.dir(reply); | ||
} | ||
}; | ||
var t0=new Date(); | ||
client.execute("xquery 1 to 10",print); | ||
client.close(function(){ | ||
var t2=new Date(); | ||
console.log("Closed in ",t2-t0," milliseconds."); | ||
}); | ||
var t1=new Date(); | ||
// time to send commands to server. | ||
console.log("Commands send in ",t1-t0," milliseconds."); |
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
Oops, something went wrong.