|
1 | | -# MarkLogic Client for node.js |
| 1 | +# MarkLogic Client API for node.js |
| 2 | + |
| 3 | +The MarkLogic Client API for node.js provides access to the MarkLogic database |
| 4 | +from node.js. |
2 | 5 |
|
3 | 6 | ## Status |
4 | 7 |
|
5 | | -### Test and example setup and teardown |
| 8 | +The MarkLogic node.js API is currently in Early Access Release 2. |
6 | 9 |
|
7 | | -To set up the test and example database and REST server, first create |
8 | | -manage-admin, rest-admin, rest-writer, and rest-reader users on the |
9 | | -database server as listed in the etc/test-config.js file. |
| 10 | +### Getting started |
10 | 11 |
|
11 | | -Then execute the following command in the root directory for the marklogic |
12 | | -package: |
| 12 | +Please see the instructions on the MarkLogic Early Access website: |
13 | 13 |
|
14 | | - node etc/test-setup.js |
| 14 | + http://ea.marklogic.com/features/node/ |
| 15 | + |
| 16 | +The instructions describe: |
| 17 | + |
| 18 | +* installing the MarkLogic database and setting up an admin user |
| 19 | +* cloning this repository to set up the API |
| 20 | +* working through some initial examples to get familiar with the API |
| 21 | + |
| 22 | +For more detail about the API, see the reference documentation: |
| 23 | + |
| 24 | + http://docs-ea.marklogic.com:8011/jsdoc/index.html |
| 25 | + |
| 26 | +### Example setup |
| 27 | + |
| 28 | +To set up the REST users for the examples, execute the following |
| 29 | +command in the root directory for the marklogic package: |
15 | 30 |
|
16 | | -To load the sample data before running the examples, execute |
| 31 | + node etc/users-setup.js |
| 32 | + |
| 33 | +Then, load the sample data: |
17 | 34 |
|
18 | 35 | node examples/before-load.js |
19 | 36 |
|
20 | | -To tear down the test and example database and REST server, execute |
| 37 | +You can then execute any of the examples in the examples |
| 38 | +subdirectory from the root directory for the marklogic package. |
| 39 | + |
| 40 | +### Test setup and teardown |
| 41 | + |
| 42 | +To set up the test database and REST server, execute the following |
| 43 | +command in the root directory for the marklogic package: |
| 44 | + |
| 45 | + node etc/test-setup.js |
| 46 | + |
| 47 | +To tear down the test database and REST server, execute |
21 | 48 |
|
22 | 49 | node etc/test-teardown.js |
23 | 50 |
|
24 | | -### Done for early access 2 (basic document CRUD and query support) |
| 51 | +### Capabilities of the node.js Client API in Early Access 2 |
25 | 52 |
|
26 | 53 | * createDatabaseClient() including HTTPS |
27 | 54 | * documents.query() |
28 | | - * queryBuilder.where() including builder structured query, |
29 | | - queryBuilder.byExample() QBE (Query By Example), and |
30 | | - queryBuilder.parsedFrom() string query |
| 55 | + * queryBuilder.where() including structured query builder |
| 56 | + * queryBuilder.byExample() for QBE (Query By Example) |
| 57 | + * queryBuilder.parsedFrom() for string query |
31 | 58 | * queryBuilder.orderBy() |
32 | 59 | * queryBuilder.calculate() |
33 | 60 | * queryBuilder.slice() |
@@ -58,12 +85,18 @@ To tear down the test and example database and REST server, execute |
58 | 85 | * config.extlibs.write() |
59 | 86 | * optimistic locking |
60 | 87 |
|
61 | | -### Deferred to early access 3 |
| 88 | +### Limitations in Early Access 2 |
| 89 | + |
| 90 | +The MarkLogic node.js Client API has not yet undergone performance or |
| 91 | +stress testing. The API should not be used in production in EA2. |
| 92 | + |
| 93 | +### Candidate Features for Early Access 3 |
62 | 94 |
|
63 | | -* opt out of JSON conversion |
64 | | -* pluggable XML conversion |
65 | | -* optional datatypes for queries and facets |
66 | | -* robust error handling, logging, and performance tuning |
67 | | -* bulk conditional content |
68 | | -* queryBuilder.calculate() - values() |
69 | | -* queryBuilder.slice() - iterator (aka reducer) |
| 95 | +* projection from result documents |
| 96 | +* values and tuples lists |
| 97 | +* resource service CRUD and invocation |
| 98 | +* server-side eval |
| 99 | +* graph CRUD |
| 100 | +* aggregates on facets |
| 101 | +* specifying the database when creating a database client |
| 102 | +* pluggable XML conversion |
0 commit comments