Skip to content

Commit a86a981

Browse files
authored
Merge branch 'master' into develop
2 parents ecfafd5 + 6969512 commit a86a981

13 files changed

+48
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# CHANGELOG
22

3+
34
## 3.2.0
45
#### New Functionality
56

@@ -13,6 +14,7 @@
1314
https://github.com/advisories/GHSA-7fh5-64p2-3v2j
1415

1516

17+
1618
## 3.1.0
1719
#### New Functionality
1820

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const db = marklogic.createDatabaseClient({
5353
apiKey: 'changeme',
5454
host: 'example.beta.marklogic.com',
5555
authType: 'cloud',
56+
5657
// basePath is optional.
5758
basePath: '/marklogic/test',
5859
// accessTokenDuration (in seconds) is optional and can be used to customize the expiration of the access token.

lib/marklogic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,4 +913,4 @@ module.exports = {
913913
* @param MarkLogicClient
914914
*/
915915
releaseClient: releaseClient
916-
};
916+
};

lib/rows.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,40 @@ function queryRowsOperationImpl(self, builtPlan, streamType, options, bindingArg
205205
return operation;
206206
}
207207

208+
if (bindingArg) {
209+
const keys = Object.keys(bindingArg);
210+
const bindingKey = keys[0];
211+
const attachments = keys[1];
212+
const metadata = keys[2];
213+
const query = JSON.stringify(builtPlan.export());
214+
const multipartBoundary = mlutil.multipartBoundary;
215+
const endpoint = '/v1/rows';
216+
217+
requestOptions.headers = {
218+
'Content-Type': 'multipart/form-data; boundary=' + multipartBoundary,
219+
Accept: 'application/json'
220+
};
221+
requestOptions.path = mlutil.databaseParam(connectionParams, endpoint, '?');
222+
223+
const operation = new Operation(
224+
'binding arguments ' + endpoint, self.client, requestOptions, 'multipart', 'single'
225+
);
226+
227+
operation.headers = {
228+
'Content-Type': 'multipart/form-data; boundary=' + multipartBoundary,
229+
};
230+
231+
operation.bindingParam = {
232+
[bindingKey]: bindingArg[bindingKey],
233+
query: query,
234+
key: bindingKey,
235+
attachments: bindingArg[attachments],
236+
metadata: bindingArg[metadata]
237+
};
238+
239+
return operation;
240+
}
241+
208242
let acceptHeader = null;
209243
let responseType = null;
210244
switch (format) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@
8484
"jsdoc": "4.0.0",
8585
"sanitize-html": "2.11.0"
8686
}
87-
}
87+
}

test-basic/bindingFromParam.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,4 +639,4 @@ describe('optic-update fromParam tests', function(){
639639
});
640640

641641
});
642-
});
642+
});

test-basic/lockForUpdate-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ describe('optic-update lockForUpdate tests', function() {
123123
}).catch(e => done(e));
124124
});
125125
});
126-
});
126+
});

test-basic/optic-fromDocUris.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ function checkResult(done) {
117117
}
118118
result.clear();
119119
done();
120-
}
120+
}

test-basic/optic-update-execute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ function verifyDocs(done){
131131
})
132132
.then(()=> done())
133133
.catch(err=> done(err));
134-
}
134+
}

test-basic/rows-graphQl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ this.timeout(6000);
7373
marklogic.releaseClient(db);
7474
done();
7575
});
76-
});
76+
});

0 commit comments

Comments
 (0)