Skip to content

Commit

Permalink
[FIX] issue 14, improve formating/jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
apb2006 committed Apr 4, 2014
1 parent 6f427ae commit 664bfa7
Show file tree
Hide file tree
Showing 33 changed files with 5,456 additions and 372 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# basex - A BaseX client for node.js
===========================

This is BaseX client for Node.js. It is work in progress. It uses the client interface via a socket connection to the BaseX server.
This is BaseX client for Node.js. It is work in progress.
It uses the [client interface](http://docs.basex.org/wiki/Server_Protocol)
via a socket connection to the BaseX server.

[BaseX](http://basex.org/) is a very light-weight, high-performance and scalable
XML Database engine and XPath/XQuery 3.0 Processor,
Expand Down Expand Up @@ -38,7 +40,7 @@ Once BaseX is installed and the BaseX server is running, test it.
## Installing BaseX
1. Java is required
1. [Download](http://basex.org/products/download/all-downloads/) and install BaseX
(tested against version 7.6)
(tested against version 7.7)
1. Run `basexserver -S`
## API specification
Expand Down Expand Up @@ -89,6 +91,10 @@ mocha -R spec test/test-commands.js
13 tests complete (408 ms)

```
# Coding
Javascript is formated using js-beautify `js-beautify -r index.js`
Documentation is generated using `jsdoc -r -d docs --verbose index.js`
# TODO
Expand All @@ -98,7 +104,7 @@ mocha -R spec test/test-commands.js
# Inspiration
Parts inspired by [node_redis](https://github.com/mranney/node_redis),
[BaseX Java client](https://github.com/BaseXdb/basex-examples/blob/master/src/main/java/org/basex/examples/api/BaseXClient.java)
[BaseX Java client](https://github.com/BaseXdb/basex/blob/master/basex-examples/src/main/java/org/basex/examples/api/BaseXClient.java)
#license
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v0.6.3 - 2014-04-03
- fix handling for add where doc is invalid (#14)
- fix tests
- applied js-beautify to the code

## v0.6.2 - 2013-07-13
- fix query array result timing issue (#10)
- fix session.create
Expand Down
22 changes: 18 additions & 4 deletions debug.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
/* example functions for use as test callbacks
* andy bunce 2011-2012
*/
/**
* example functions for use as test callbacks
* andy bunce 2011-2014
**/

/**
* @method print
* @param {} err
* @param {} reply
* @return
*/
function print(err, reply) {
if (err) {
console.log("Error: " + err);
} else {
console.dir(reply);
}
};
// show supplied msg then basex server response

/**
* show supplied msg then basex server response
* @method printMsg
* @param {} msg
* @return FunctionExpression
*/
function printMsg(msg) {
return function(err, reply){
console.log("printMsg: ",msg);
Expand Down
Loading

0 comments on commit 664bfa7

Please sign in to comment.