Skip to content

Commit 8f63f6b

Browse files
author
Aries Yuwono
committed
merge
Merge branch 'develop'
2 parents 11aafb5 + 9160f78 commit 8f63f6b

File tree

212 files changed

+696
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+696
-242
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ from Node.js applications.
1414

1515
## Status
1616

17-
Release 1.0.4 of the MarkLogic Node.js API
17+
Release 1.0.5 of the MarkLogic Node.js API
1818

1919
## Sample
2020

etc/test-config-qa-ssl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

etc/test-config-qa.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,12 @@ var restWriterPassword = 'x';
3333
var restEvaluatorUser = 'rest-evaluator';
3434
var restEvaluatorPassword = 'x';
3535

36+
var restTemporalUser = 'rest-temporal-writer';
37+
var restTemporalPassword = 'x';
38+
39+
var configAdminUser = 'admin';
40+
var configAdminPassword = 'admin';
41+
3642
var testServerName = 'node-client-api-rest-server';
3743

3844
// For SSL without client cert, use rejectUnauthorized: false
@@ -68,13 +74,27 @@ module.exports = {
6874
password: restEvaluatorPassword,
6975
authType: restAuthType
7076
},
77+
restTemporalConnection: {
78+
host: testHost,
79+
port: restPort,
80+
user: restTemporalUser,
81+
password: restTemporalPassword,
82+
authType: restAuthType
83+
},
7184
manageAdminConnection: {
7285
host: testHost,
7386
port: managePort,
7487
user: restAdminUser,
7588
password: restAdminPassword,
7689
authType: manageAuthType
7790
},
91+
configAdminConnection: {
92+
host: testHost,
93+
port: restPort,
94+
user: configAdminUser,
95+
password: configAdminPassword,
96+
authType: restAuthType
97+
},
7898
restSslConnection: {
7999
host: testHost,
80100
port: restPort,

etc/test-config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,9 @@ var restWriterPassword = 'x';
3333
var restEvaluatorUser = 'rest-evaluator';
3434
var restEvaluatorPassword = 'x';
3535

36+
var restTemporalUser = 'rest-temporal-writer';
37+
var restTemporalPassword = 'x';
38+
3639
var testServerName = 'unittest-nodeapi';
3740

3841
// For SSL without client cert, use rejectUnauthorized: false
@@ -69,6 +72,13 @@ module.exports = {
6972
password: restEvaluatorPassword,
7073
authType: restAuthType
7174
},
75+
restTemporalConnection: {
76+
host: testHost,
77+
port: restPort,
78+
user: restTemporalUser,
79+
password: restTemporalPassword,
80+
authType: restAuthType
81+
},
7282
manageAdminConnection: {
7383
host: testHost,
7484
port: managePort,

etc/test-lib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

etc/test-setup-prompt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

etc/test-setup-qa.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

etc/test-setup-users.js

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,6 +75,33 @@ function setupUsers(manager, done) {
7575
}
7676
}).result();
7777
}).
78+
then(function(response) {
79+
return manager.get({
80+
endpoint: '/manage/v2/roles/'+encodeURIComponent('rest-temporal-writer')
81+
}).result();
82+
}).
83+
then(function(response) {
84+
if (response.statusCode < 400) {
85+
return this;
86+
}
87+
return manager.post({
88+
endpoint: '/manage/v2/roles',
89+
body: {
90+
'role-name': 'rest-temporal-writer',
91+
description: 'REST writer with temporal privileges',
92+
role: [
93+
'rest-writer'
94+
],
95+
privilege: [
96+
{
97+
'privilege-name': 'temporal-statement-set-system-time',
98+
action: 'http://marklogic.com/xdmp/privileges/temporal-statement-set-system-time',
99+
kind: 'execute'
100+
}
101+
]
102+
}
103+
}).result();
104+
}).
78105
then(function(response) {
79106
return manager.get({
80107
endpoint: '/manage/v2/users'
@@ -112,6 +139,13 @@ function setupUsers(manager, done) {
112139
description: 'rest-writer user with evaluate privileges',
113140
password: testconfig.restEvaluatorConnection.password
114141
};
142+
userName = testconfig.restTemporalConnection.user;
143+
requiredUsers[userName] = {
144+
role: 'rest-temporal-writer',
145+
'user-name': userName,
146+
description: 'rest-writer user with temporal privileges',
147+
password: testconfig.restTemporalConnection.password
148+
};
115149

116150
response.data['user-default-list']['list-items']['list-item'].
117151
forEach(function(user) {

etc/test-setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

etc/test-teardown-qa.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

etc/test-teardown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

etc/users-setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/all.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,4 +49,4 @@ fs.readdir('./examples', function(err, filenames) {
4949
exutil.addScript(new QueuedScript(filename));
5050
}
5151
});
52-
});
52+
});

examples/before-load.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/example-util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/optimistic-locking.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/patch-document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/probe-document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/query-builder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/query-by-example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/query-extract.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/query-parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/read-documents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/read-metadata.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/read-stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/transform-on-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

examples/write-remove.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -86,4 +86,4 @@ function isFinishing(isDone) {
8686
} else {
8787
return true;
8888
}
89-
}
89+
}

examples/write-stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

gulpfile.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -42,7 +42,7 @@ gulp.task('doc', function() {
4242
{
4343
path: 'etc/marklogic-template',
4444
systemName: 'MarkLogic Node.js API',
45-
copyright: 'Copyright 2014-2015 MarkLogic Corporation',
45+
copyright: 'Copyright 2014-2016 MarkLogic Corporation',
4646
theme: 'marklogic',
4747
inverseNav: true,
4848
navType: 'vertical',

lib/bluebird-plus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015 MarkLogic Corporation
2+
* Copyright 2015-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

lib/documents.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

lib/extlibs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

lib/graphs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -731,7 +731,7 @@ Graphs.prototype.sparql = function queryGraphSPARQL() {
731731
/**
732732
* Executes a SPARQL update against the graphs; takes a configuration object with
733733
* the following named parameters or, as a shortcut, the SPARQL update data.
734-
* @method graphs#sparql
734+
* @method graphs#sparqlUpdate
735735
* @param {string|ReadableStream} data - the SPARQL update
736736
* @param {object[]} [permissions] - the permissions controlling which users can read or
737737
* write the documents with the updated triples

lib/marklogic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

lib/mllog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 MarkLogic Corporation
2+
* Copyright 2014-2016 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)