@@ -28,7 +28,7 @@ <h1 class="page-title">Class: Sender</h1>
2828
2929< header >
3030
31- < h2 > < span class ="attribs "> < span class ="type-signature "> </ span > </ span > Sender< span class ="signature "> (bufferSize, jwk < span class =" signature-attributes " > opt </ span > )</ span > < span class ="type-signature "> </ span > </ h2 >
31+ < h2 > < span class ="attribs "> < span class ="type-signature "> </ span > </ span > Sender< span class ="signature "> (options )</ span > < span class ="type-signature "> </ span > </ h2 >
3232
3333 < div class ="class-description "> The QuestDB client's API provides methods to connect to the database, ingest data and close the connection.
3434< p >
@@ -55,7 +55,7 @@ <h2>Constructor</h2>
5555
5656
5757
58- < h4 class ="name " id ="Sender "> < span class ="type-signature "> </ span > new Sender< span class ="signature "> (bufferSize, jwk < span class =" signature-attributes " > opt </ span > )</ span > < span class ="type-signature "> </ span > </ h4 >
58+ < h4 class ="name " id ="Sender "> < span class ="type-signature "> </ span > new Sender< span class ="signature "> (options )</ span > < span class ="type-signature "> </ span > </ h4 >
5959
6060
6161
@@ -87,8 +87,6 @@ <h5>Parameters:</h5>
8787 < th > Type</ th >
8888
8989
90- < th > Attributes</ th >
91-
9290
9391
9492
@@ -101,64 +99,32 @@ <h5>Parameters:</h5>
10199
102100 < tr >
103101
104- < td class ="name "> < code > bufferSize </ code > </ td >
102+ < td class ="name "> < code > options </ code > </ td >
105103
106104
107105 < td class ="type ">
108106
109107
110- < span class ="param-type "> number </ span >
108+ < span class ="param-type "> object </ span >
111109
112110
113111
114112 </ td >
115113
116114
117- < td class ="attributes ">
118-
119-
120-
121-
122-
123- </ td >
124-
125115
126116
127117
128- < td class ="description last "> Size of the buffer used by the sender to collect rows, provided in bytes.</ td >
129- </ tr >
130-
131-
132-
133- < tr >
134-
135- < td class ="name "> < code > jwk</ code > </ td >
136-
137-
138- < td class ="type ">
139-
140-
141- < span class ="param-type "> Object</ span >
142-
143-
144-
145- </ td >
146-
147-
148- < td class ="attributes ">
149-
150- <optional> < br >
151-
152-
153-
154-
155-
156- </ td >
157-
158-
159-
160-
161- < td class ="description last "> JWK for authentication, client is not authenticated if not provided. < br > Server might reject the connection depending on configuration.</ td >
118+ < td class ="description last "> Configuration options. < br >
119+ < p >
120+ Properties of the object:
121+ < ul >
122+ < li > bufferSize: < i > number</ i > - Size of the buffer used by the sender to collect rows, provided in bytes. < br >
123+ Optional, defaults to 8192 bytes </ li >
124+ < li > jwk: < i > {x: string, y: string, kid: string, kty: string, d: string, crv: string}</ i > - JsonWebKey for authentication. < br >
125+ If not provided, client is not authenticated and server might reject the connection depending on configuration.</ li >
126+ </ ul >
127+ </ p > </ td >
162128 </ tr >
163129
164130
@@ -199,7 +165,7 @@ <h5>Parameters:</h5>
199165
200166 < dt class ="tag-source "> Source:</ dt >
201167 < dd class ="tag-source "> < ul class ="dummy "> < li >
202- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line22 "> line 22 </ a >
168+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line24 "> line 24 </ a >
203169 </ li > </ ul > </ dd >
204170
205171
@@ -356,7 +322,7 @@ <h5>Parameters:</h5>
356322
357323 < dt class ="tag-source "> Source:</ dt >
358324 < dd class ="tag-source "> < ul class ="dummy "> < li >
359- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line289 "> line 289 </ a >
325+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line323 "> line 323 </ a >
360326 </ li > </ ul > </ dd >
361327
362328
@@ -445,7 +411,7 @@ <h4 class="name" id="atNow"><span class="type-signature"></span>atNow<span class
445411
446412 < dt class ="tag-source "> Source:</ dt >
447413 < dd class ="tag-source "> < ul class ="dummy "> < li >
448- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line307 "> line 307 </ a >
414+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line343 "> line 343 </ a >
449415 </ li > </ ul > </ dd >
450416
451417
@@ -605,7 +571,7 @@ <h5>Parameters:</h5>
605571
606572 < dt class ="tag-source "> Source:</ dt >
607573 < dd class ="tag-source "> < ul class ="dummy "> < li >
608- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line227 "> line 227 </ a >
574+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line254 "> line 254 </ a >
609575 </ li > </ ul > </ dd >
610576
611577
@@ -716,7 +682,7 @@ <h4 class="name" id="close"><span class="type-signature">(async) </span>close<sp
716682
717683 < dt class ="tag-source "> Source:</ dt >
718684 < dd class ="tag-source "> < ul class ="dummy "> < li >
719- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line128 "> line 128 </ a >
685+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line149 "> line 149 </ a >
720686 </ li > </ ul > </ dd >
721687
722688
@@ -911,7 +877,7 @@ <h5>Parameters:</h5>
911877
912878 < dt class ="tag-source "> Source:</ dt >
913879 < dd class ="tag-source "> < ul class ="dummy "> < li >
914- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line74 "> line 74 </ a >
880+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line92 "> line 92 </ a >
915881 </ li > </ ul > </ dd >
916882
917883
@@ -1071,7 +1037,7 @@ <h5>Parameters:</h5>
10711037
10721038 < dt class ="tag-source "> Source:</ dt >
10731039 < dd class ="tag-source "> < ul class ="dummy "> < li >
1074- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line241 "> line 241 </ a >
1040+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line269 "> line 269 </ a >
10751041 </ li > </ ul > </ dd >
10761042
10771043
@@ -1129,15 +1095,16 @@ <h5>Returns:</h5>
11291095
11301096
11311097
1132- < h4 class ="name " id ="flush "> < span class ="type-signature "> (async) </ span > flush< span class ="signature "> ()</ span > < span class ="type-signature "> </ span > </ h4 >
1098+ < h4 class ="name " id ="flush "> < span class ="type-signature "> (async) </ span > flush< span class ="signature "> ()</ span > < span class ="type-signature "> → {boolean} </ span > </ h4 >
11331099
11341100
11351101
11361102
11371103
11381104
11391105< div class ="description ">
1140- Sends the buffer's content to the database and clears the buffer.
1106+ Sends the buffer's content to the database and compacts the buffer.
1107+ If the last row is not finished it stays in the sender's buffer.
11411108</ div >
11421109
11431110
@@ -1181,7 +1148,7 @@ <h4 class="name" id="flush"><span class="type-signature">(async) </span>flush<sp
11811148
11821149 < dt class ="tag-source "> Source:</ dt >
11831150 < dd class ="tag-source "> < ul class ="dummy "> < li >
1184- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line138 "> line 138 </ a >
1151+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line162 "> line 162 </ a >
11851152 </ li > </ ul > </ dd >
11861153
11871154
@@ -1206,6 +1173,28 @@ <h4 class="name" id="flush"><span class="type-signature">(async) </span>flush<sp
12061173
12071174
12081175
1176+ < h5 > Returns:</ h5 >
1177+
1178+
1179+ < div class ="param-desc ">
1180+ Returns true if there was data in the buffer to send.
1181+ </ div >
1182+
1183+
1184+
1185+ < dl >
1186+ < dt >
1187+ Type
1188+ </ dt >
1189+ < dd >
1190+
1191+ < span class ="param-type "> boolean</ span >
1192+
1193+
1194+ </ dd >
1195+ </ dl >
1196+
1197+
12091198
12101199
12111200
@@ -1341,7 +1330,7 @@ <h5>Parameters:</h5>
13411330
13421331 < dt class ="tag-source "> Source:</ dt >
13431332 < dd class ="tag-source "> < ul class ="dummy "> < li >
1344- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line255 "> line 255 </ a >
1333+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line285 "> line 285 </ a >
13451334 </ li > </ ul > </ dd >
13461335
13471336
@@ -1452,7 +1441,7 @@ <h4 class="name" id="reset"><span class="type-signature"></span>reset<span class
14521441
14531442 < dt class ="tag-source "> Source:</ dt >
14541443 < dd class ="tag-source "> < ul class ="dummy "> < li >
1455- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line62 "> line 62 </ a >
1444+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line80 "> line 80 </ a >
14561445 </ li > </ ul > </ dd >
14571446
14581447
@@ -1518,8 +1507,9 @@ <h4 class="name" id="resize"><span class="type-signature"></span>resize<span cla
15181507
15191508
15201509< div class ="description ">
1521- Reinitializes the buffer of the sender. < br >
1510+ Extends the size of the sender's buffer . < br >
15221511Can be used to increase the size of buffer if overflown.
1512+ The buffer's content is copied into the new buffer.
15231513</ div >
15241514
15251515
@@ -1612,7 +1602,7 @@ <h5>Parameters:</h5>
16121602
16131603 < dt class ="tag-source "> Source:</ dt >
16141604 < dd class ="tag-source "> < ul class ="dummy "> < li >
1615- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line50 "> line 50 </ a >
1605+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line65 "> line 65 </ a >
16161606 </ li > </ ul > </ dd >
16171607
16181608
@@ -1772,7 +1762,7 @@ <h5>Parameters:</h5>
17721762
17731763 < dt class ="tag-source "> Source:</ dt >
17741764 < dd class ="tag-source "> < ul class ="dummy "> < li >
1775- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line211 "> line 211 </ a >
1765+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line237 "> line 237 </ a >
17761766 </ li > </ ul > </ dd >
17771767
17781768
@@ -1954,7 +1944,7 @@ <h5>Parameters:</h5>
19541944
19551945 < dt class ="tag-source "> Source:</ dt >
19561946 < dd class ="tag-source "> < ul class ="dummy "> < li >
1957- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line188 "> line 188 </ a >
1947+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line212 "> line 212 </ a >
19581948 </ li > </ ul > </ dd >
19591949
19601950
@@ -2113,7 +2103,7 @@ <h5>Parameters:</h5>
21132103
21142104 < dt class ="tag-source "> Source:</ dt >
21152105 < dd class ="tag-source "> < ul class ="dummy "> < li >
2116- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line168 "> line 168 </ a >
2106+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line191 "> line 191 </ a >
21172107 </ li > </ ul > </ dd >
21182108
21192109
@@ -2295,7 +2285,7 @@ <h5>Parameters:</h5>
22952285
22962286 < dt class ="tag-source "> Source:</ dt >
22972287 < dd class ="tag-source "> < ul class ="dummy "> < li >
2298- < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line273 "> line 273 </ a >
2288+ < a href ="src_sender.js.html "> src/sender.js</ a > , < a href ="src_sender.js.html#line305 "> line 305 </ a >
22992289 </ li > </ ul > </ dd >
23002290
23012291
@@ -2369,7 +2359,7 @@ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-@q
23692359< br class ="clear ">
23702360
23712361< footer >
2372- Documentation generated by < a href ="https://github.com/jsdoc/jsdoc "> JSDoc 3.6.11</ a > on Fri Aug 12 2022 08:59:08 GMT+0100 (British Summer Time)
2362+ Documentation generated by < a href ="https://github.com/jsdoc/jsdoc "> JSDoc 3.6.11</ a > on Mon Aug 15 2022 11:08:10 GMT+0100 (British Summer Time)
23732363</ footer >
23742364
23752365< script > prettyPrint ( ) ; </ script >
0 commit comments