You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/base/request.js
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,7 @@ class Request extends EventEmitter {
53
53
* @param {Template literal} template
54
54
* @return {String}
55
55
*/
56
+
56
57
template(){
57
58
constvalues=Array.prototype.slice.call(arguments)
58
59
conststrings=values.shift()
@@ -101,7 +102,7 @@ class Request extends EventEmitter {
101
102
* Add an input parameter to the request.
102
103
*
103
104
* @param {String} name Name of the input parameter without @ char.
104
-
* @param {*} [type] SQL data type of input parameter. If you omit type, module automaticaly decide which SQL data type should be used based on JS data type.
105
+
* @param {*} [type] SQL data type of input parameter. If you omit type, module automatically decides which SQL data type should be used based on JS data type.
105
106
* @param {*} value Input parameter value. `undefined` and `NaN` values are automatically converted to `null` values.
106
107
* @return {Request}
107
108
*/
@@ -147,7 +148,7 @@ class Request extends EventEmitter {
147
148
* Replace an input parameter on the request.
148
149
*
149
150
* @param {String} name Name of the input parameter without @ char.
150
-
* @param {*} [type] SQL data type of input parameter. If you omit type, module automaticaly decide which SQL data type should be used based on JS data type.
151
+
* @param {*} [type] SQL data type of input parameter. If you omit type, module automatically decides which SQL data type should be used based on JS data type.
151
152
* @param {*} value Input parameter value. `undefined` and `NaN` values are automatically converted to `null` values.
152
153
* @return {Request}
153
154
*/
@@ -253,7 +254,7 @@ class Request extends EventEmitter {
253
254
returnthis
254
255
}
255
256
256
-
// Check is method was called as tagged template
257
+
// Check if method was called as tagged template
257
258
if(typeofbatch==='object'){
258
259
constvalues=Array.prototype.slice.call(arguments)
259
260
conststrings=values.shift()
@@ -376,6 +377,7 @@ class Request extends EventEmitter {
376
377
* @param {Object} streamOptions - optional options to configure the readable stream with like highWaterMark
377
378
* @return {Stream}
378
379
*/
380
+
379
381
toReadableStream(streamOptions={}){
380
382
this.stream=true
381
383
this.pause()
@@ -407,6 +409,7 @@ class Request extends EventEmitter {
407
409
* @param {Stream} stream Stream to pipe data into.
408
410
* @return {Stream}
409
411
*/
412
+
410
413
pipe(writableStream){
411
414
constreadableStream=this.toReadableStream()
412
415
returnreadableStream.pipe(writableStream)
@@ -450,7 +453,7 @@ class Request extends EventEmitter {
0 commit comments