1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = void 0;
|
7 | var _events = require("events");
|
8 | var _writableTrackingBuffer = _interopRequireDefault(require("./tracking-buffer/writable-tracking-buffer"));
|
9 | var _stream = require("stream");
|
10 | var _token = require("./token/token");
|
11 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12 | /**
|
13 | * @private
|
14 | */
|
15 | const FLAGS = {
|
16 | nullable: 1 << 0,
|
17 | caseSen: 1 << 1,
|
18 | updateableReadWrite: 1 << 2,
|
19 | updateableUnknown: 1 << 3,
|
20 | identity: 1 << 4,
|
21 | computed: 1 << 5,
|
22 | // introduced in TDS 7.2
|
23 | fixedLenCLRType: 1 << 8,
|
24 | // introduced in TDS 7.2
|
25 | sparseColumnSet: 1 << 10,
|
26 | // introduced in TDS 7.3.B
|
27 | hidden: 1 << 13,
|
28 | // introduced in TDS 7.2
|
29 | key: 1 << 14,
|
30 | // introduced in TDS 7.2
|
31 | nullableUnknown: 1 << 15 // introduced in TDS 7.2
|
32 | };
|
33 |
|
34 | /**
|
35 | * @private
|
36 | */
|
37 | const DONE_STATUS = {
|
38 | FINAL: 0x00,
|
39 | MORE: 0x1,
|
40 | ERROR: 0x2,
|
41 | INXACT: 0x4,
|
42 | COUNT: 0x10,
|
43 | ATTN: 0x20,
|
44 | SRVERROR: 0x100
|
45 | };
|
46 |
|
47 | /**
|
48 | * @private
|
49 | */
|
50 |
|
51 | const rowTokenBuffer = Buffer.from([_token.TYPE.ROW]);
|
52 | const textPointerAndTimestampBuffer = Buffer.from([
|
53 | // TextPointer length
|
54 | 0x10,
|
55 | // TextPointer
|
56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
57 | // Timestamp
|
58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]);
|
59 | const textPointerNullBuffer = Buffer.from([0x00]);
|
60 |
|
61 | // A transform that converts rows to packets.
|
62 | class RowTransform extends _stream.Transform {
|
63 | /**
|
64 | * @private
|
65 | */
|
66 |
|
67 | /**
|
68 | * @private
|
69 | */
|
70 |
|
71 | /**
|
72 | * @private
|
73 | */
|
74 |
|
75 | /**
|
76 | * @private
|
77 | */
|
78 |
|
79 | /**
|
80 | * @private
|
81 | */
|
82 | constructor(bulkLoad) {
|
83 | super({
|
84 | writableObjectMode: true
|
85 | });
|
86 | this.bulkLoad = bulkLoad;
|
87 | this.mainOptions = bulkLoad.options;
|
88 | this.columns = bulkLoad.columns;
|
89 | this.columnMetadataWritten = false;
|
90 | }
|
91 |
|
92 | /**
|
93 | * @private
|
94 | */
|
95 | _transform(row, _encoding, callback) {
|
96 | if (!this.columnMetadataWritten) {
|
97 | this.push(this.bulkLoad.getColMetaData());
|
98 | this.columnMetadataWritten = true;
|
99 | }
|
100 | this.push(rowTokenBuffer);
|
101 | for (let i = 0; i < this.columns.length; i++) {
|
102 | const c = this.columns[i];
|
103 | let value = Array.isArray(row) ? row[i] : row[c.objName];
|
104 | if (!this.bulkLoad.firstRowWritten) {
|
105 | try {
|
106 | value = c.type.validate(value, c.collation);
|
107 | } catch (error) {
|
108 | return callback(error);
|
109 | }
|
110 | }
|
111 | const parameter = {
|
112 | length: c.length,
|
113 | scale: c.scale,
|
114 | precision: c.precision,
|
115 | value: value
|
116 | };
|
117 | if (c.type.name === 'Text' || c.type.name === 'Image' || c.type.name === 'NText') {
|
118 | if (value == null) {
|
119 | this.push(textPointerNullBuffer);
|
120 | continue;
|
121 | }
|
122 | this.push(textPointerAndTimestampBuffer);
|
123 | }
|
124 | this.push(c.type.generateParameterLength(parameter, this.mainOptions));
|
125 | for (const chunk of c.type.generateParameterData(parameter, this.mainOptions)) {
|
126 | this.push(chunk);
|
127 | }
|
128 | }
|
129 | process.nextTick(callback);
|
130 | }
|
131 |
|
132 | /**
|
133 | * @private
|
134 | */
|
135 | _flush(callback) {
|
136 | this.push(this.bulkLoad.createDoneToken());
|
137 | process.nextTick(callback);
|
138 | }
|
139 | }
|
140 |
|
141 | /**
|
142 | * A BulkLoad instance is used to perform a bulk insert.
|
143 | *
|
144 | * Use [[Connection.newBulkLoad]] to create a new instance, and [[Connection.execBulkLoad]] to execute it.
|
145 | *
|
146 | * Example of BulkLoad Usages:
|
147 | *
|
148 | * ```js
|
149 | * // optional BulkLoad options
|
150 | * const options = { keepNulls: true };
|
151 | *
|
152 | * // instantiate - provide the table where you'll be inserting to, options and a callback
|
153 | * const bulkLoad = connection.newBulkLoad('MyTable', options, (error, rowCount) => {
|
154 | * console.log('inserted %d rows', rowCount);
|
155 | * });
|
156 | *
|
157 | * // setup your columns - always indicate whether the column is nullable
|
158 | * bulkLoad.addColumn('myInt', TYPES.Int, { nullable: false });
|
159 | * bulkLoad.addColumn('myString', TYPES.NVarChar, { length: 50, nullable: true });
|
160 | *
|
161 | * // execute
|
162 | * connection.execBulkLoad(bulkLoad, [
|
163 | * { myInt: 7, myString: 'hello' },
|
164 | * { myInt: 23, myString: 'world' }
|
165 | * ]);
|
166 | * ```
|
167 | */
|
168 | class BulkLoad extends _events.EventEmitter {
|
169 | /**
|
170 | * @private
|
171 | */
|
172 |
|
173 | /**
|
174 | * @private
|
175 | */
|
176 |
|
177 | /**
|
178 | * @private
|
179 | */
|
180 |
|
181 | /**
|
182 | * @private
|
183 | */
|
184 |
|
185 | /**
|
186 | * @private
|
187 | */
|
188 |
|
189 | /**
|
190 | * @private
|
191 | */
|
192 |
|
193 | /**
|
194 | * @private
|
195 | */
|
196 |
|
197 | /**
|
198 | * @private
|
199 | */
|
200 |
|
201 | /**
|
202 | * @private
|
203 | */
|
204 |
|
205 | /**
|
206 | * @private
|
207 | */
|
208 |
|
209 | /**
|
210 | * @private
|
211 | */
|
212 |
|
213 | /**
|
214 | * @private
|
215 | */
|
216 |
|
217 | /**
|
218 | * @private
|
219 | */
|
220 |
|
221 | /**
|
222 | * @private
|
223 | */
|
224 |
|
225 | /**
|
226 | * @private
|
227 | */
|
228 |
|
229 | /**
|
230 | * @private
|
231 | */
|
232 |
|
233 | /**
|
234 | * @private
|
235 | */
|
236 |
|
237 | /**
|
238 | * @private
|
239 | */
|
240 | constructor(table, collation, connectionOptions, {
|
241 | checkConstraints = false,
|
242 | fireTriggers = false,
|
243 | keepNulls = false,
|
244 | lockTable = false,
|
245 | order = {}
|
246 | }, callback) {
|
247 | if (typeof checkConstraints !== 'boolean') {
|
248 | throw new TypeError('The "options.checkConstraints" property must be of type boolean.');
|
249 | }
|
250 | if (typeof fireTriggers !== 'boolean') {
|
251 | throw new TypeError('The "options.fireTriggers" property must be of type boolean.');
|
252 | }
|
253 | if (typeof keepNulls !== 'boolean') {
|
254 | throw new TypeError('The "options.keepNulls" property must be of type boolean.');
|
255 | }
|
256 | if (typeof lockTable !== 'boolean') {
|
257 | throw new TypeError('The "options.lockTable" property must be of type boolean.');
|
258 | }
|
259 | if (typeof order !== 'object' || order === null) {
|
260 | throw new TypeError('The "options.order" property must be of type object.');
|
261 | }
|
262 | for (const [column, direction] of Object.entries(order)) {
|
263 | if (direction !== 'ASC' && direction !== 'DESC') {
|
264 | throw new TypeError('The value of the "' + column + '" key in the "options.order" object must be either "ASC" or "DESC".');
|
265 | }
|
266 | }
|
267 | super();
|
268 | this.error = undefined;
|
269 | this.canceled = false;
|
270 | this.executionStarted = false;
|
271 | this.collation = collation;
|
272 | this.table = table;
|
273 | this.options = connectionOptions;
|
274 | this.callback = callback;
|
275 | this.columns = [];
|
276 | this.columnsByName = {};
|
277 | this.firstRowWritten = false;
|
278 | this.streamingMode = false;
|
279 | this.rowToPacketTransform = new RowTransform(this); // eslint-disable-line no-use-before-define
|
280 |
|
281 | this.bulkOptions = {
|
282 | checkConstraints,
|
283 | fireTriggers,
|
284 | keepNulls,
|
285 | lockTable,
|
286 | order
|
287 | };
|
288 | }
|
289 |
|
290 | /**
|
291 | * Adds a column to the bulk load.
|
292 | *
|
293 | * The column definitions should match the table you are trying to insert into.
|
294 | * Attempting to call addColumn after the first row has been added will throw an exception.
|
295 | *
|
296 | * ```js
|
297 | * bulkLoad.addColumn('MyIntColumn', TYPES.Int, { nullable: false });
|
298 | * ```
|
299 | *
|
300 | * @param name The name of the column.
|
301 | * @param type One of the supported `data types`.
|
302 | * @param __namedParameters Additional column type information. At a minimum, `nullable` must be set to true or false.
|
303 | * @param length For VarChar, NVarChar, VarBinary. Use length as `Infinity` for VarChar(max), NVarChar(max) and VarBinary(max).
|
304 | * @param nullable Indicates whether the column accepts NULL values.
|
305 | * @param objName If the name of the column is different from the name of the property found on `rowObj` arguments passed to [[addRow]] or [[Connection.execBulkLoad]], then you can use this option to specify the property name.
|
306 | * @param precision For Numeric, Decimal.
|
307 | * @param scale For Numeric, Decimal, Time, DateTime2, DateTimeOffset.
|
308 | */
|
309 | addColumn(name, type, {
|
310 | output = false,
|
311 | length,
|
312 | precision,
|
313 | scale,
|
314 | objName = name,
|
315 | nullable = true
|
316 | }) {
|
317 | if (this.firstRowWritten) {
|
318 | throw new Error('Columns cannot be added to bulk insert after the first row has been written.');
|
319 | }
|
320 | if (this.executionStarted) {
|
321 | throw new Error('Columns cannot be added to bulk insert after execution has started.');
|
322 | }
|
323 | const column = {
|
324 | type: type,
|
325 | name: name,
|
326 | value: null,
|
327 | output: output,
|
328 | length: length,
|
329 | precision: precision,
|
330 | scale: scale,
|
331 | objName: objName,
|
332 | nullable: nullable,
|
333 | collation: this.collation
|
334 | };
|
335 | if ((type.id & 0x30) === 0x20) {
|
336 | if (column.length == null && type.resolveLength) {
|
337 | column.length = type.resolveLength(column);
|
338 | }
|
339 | }
|
340 | if (type.resolvePrecision && column.precision == null) {
|
341 | column.precision = type.resolvePrecision(column);
|
342 | }
|
343 | if (type.resolveScale && column.scale == null) {
|
344 | column.scale = type.resolveScale(column);
|
345 | }
|
346 | this.columns.push(column);
|
347 | this.columnsByName[name] = column;
|
348 | }
|
349 |
|
350 | /**
|
351 | * @private
|
352 | */
|
353 | getOptionsSql() {
|
354 | const addOptions = [];
|
355 | if (this.bulkOptions.checkConstraints) {
|
356 | addOptions.push('CHECK_CONSTRAINTS');
|
357 | }
|
358 | if (this.bulkOptions.fireTriggers) {
|
359 | addOptions.push('FIRE_TRIGGERS');
|
360 | }
|
361 | if (this.bulkOptions.keepNulls) {
|
362 | addOptions.push('KEEP_NULLS');
|
363 | }
|
364 | if (this.bulkOptions.lockTable) {
|
365 | addOptions.push('TABLOCK');
|
366 | }
|
367 | if (this.bulkOptions.order) {
|
368 | const orderColumns = [];
|
369 | for (const [column, direction] of Object.entries(this.bulkOptions.order)) {
|
370 | orderColumns.push(`${column} ${direction}`);
|
371 | }
|
372 | if (orderColumns.length) {
|
373 | addOptions.push(`ORDER (${orderColumns.join(', ')})`);
|
374 | }
|
375 | }
|
376 | if (addOptions.length > 0) {
|
377 | return ` WITH (${addOptions.join(',')})`;
|
378 | } else {
|
379 | return '';
|
380 | }
|
381 | }
|
382 |
|
383 | /**
|
384 | * @private
|
385 | */
|
386 | getBulkInsertSql() {
|
387 | let sql = 'insert bulk ' + this.table + '(';
|
388 | for (let i = 0, len = this.columns.length; i < len; i++) {
|
389 | const c = this.columns[i];
|
390 | if (i !== 0) {
|
391 | sql += ', ';
|
392 | }
|
393 | sql += '[' + c.name + '] ' + c.type.declaration(c);
|
394 | }
|
395 | sql += ')';
|
396 | sql += this.getOptionsSql();
|
397 | return sql;
|
398 | }
|
399 |
|
400 | /**
|
401 | * This is simply a helper utility function which returns a `CREATE TABLE SQL` statement based on the columns added to the bulkLoad object.
|
402 | * This may be particularly handy when you want to insert into a temporary table (a table which starts with `#`).
|
403 | *
|
404 | * ```js
|
405 | * var sql = bulkLoad.getTableCreationSql();
|
406 | * ```
|
407 | *
|
408 | * A side note on bulk inserting into temporary tables: if you want to access a local temporary table after executing the bulk load,
|
409 | * you'll need to use the same connection and execute your requests using [[Connection.execSqlBatch]] instead of [[Connection.execSql]]
|
410 | */
|
411 | getTableCreationSql() {
|
412 | let sql = 'CREATE TABLE ' + this.table + '(\n';
|
413 | for (let i = 0, len = this.columns.length; i < len; i++) {
|
414 | const c = this.columns[i];
|
415 | if (i !== 0) {
|
416 | sql += ',\n';
|
417 | }
|
418 | sql += '[' + c.name + '] ' + c.type.declaration(c);
|
419 | if (c.nullable !== undefined) {
|
420 | sql += ' ' + (c.nullable ? 'NULL' : 'NOT NULL');
|
421 | }
|
422 | }
|
423 | sql += '\n)';
|
424 | return sql;
|
425 | }
|
426 |
|
427 | /**
|
428 | * @private
|
429 | */
|
430 | getColMetaData() {
|
431 | const tBuf = new _writableTrackingBuffer.default(100, null, true);
|
432 | // TokenType
|
433 | tBuf.writeUInt8(_token.TYPE.COLMETADATA);
|
434 | // Count
|
435 | tBuf.writeUInt16LE(this.columns.length);
|
436 | for (let j = 0, len = this.columns.length; j < len; j++) {
|
437 | const c = this.columns[j];
|
438 | // UserType
|
439 | if (this.options.tdsVersion < '7_2') {
|
440 | tBuf.writeUInt16LE(0);
|
441 | } else {
|
442 | tBuf.writeUInt32LE(0);
|
443 | }
|
444 |
|
445 | // Flags
|
446 | let flags = FLAGS.updateableReadWrite;
|
447 | if (c.nullable) {
|
448 | flags |= FLAGS.nullable;
|
449 | } else if (c.nullable === undefined && this.options.tdsVersion >= '7_2') {
|
450 | flags |= FLAGS.nullableUnknown;
|
451 | }
|
452 | tBuf.writeUInt16LE(flags);
|
453 |
|
454 | // TYPE_INFO
|
455 | tBuf.writeBuffer(c.type.generateTypeInfo(c, this.options));
|
456 |
|
457 | // TableName
|
458 | if (c.type.hasTableName) {
|
459 | tBuf.writeUsVarchar(this.table, 'ucs2');
|
460 | }
|
461 |
|
462 | // ColName
|
463 | tBuf.writeBVarchar(c.name, 'ucs2');
|
464 | }
|
465 | return tBuf.data;
|
466 | }
|
467 |
|
468 | /**
|
469 | * Sets a timeout for this bulk load.
|
470 | *
|
471 | * ```js
|
472 | * bulkLoad.setTimeout(timeout);
|
473 | * ```
|
474 | *
|
475 | * @param timeout The number of milliseconds before the bulk load is considered failed, or 0 for no timeout.
|
476 | * When no timeout is set for the bulk load, the [[ConnectionOptions.requestTimeout]] of the Connection is used.
|
477 | */
|
478 | setTimeout(timeout) {
|
479 | this.timeout = timeout;
|
480 | }
|
481 |
|
482 | /**
|
483 | * @private
|
484 | */
|
485 | createDoneToken() {
|
486 | // It might be nice to make DoneToken a class if anything needs to create them, but for now, just do it here
|
487 | const tBuf = new _writableTrackingBuffer.default(this.options.tdsVersion < '7_2' ? 9 : 13);
|
488 | tBuf.writeUInt8(_token.TYPE.DONE);
|
489 | const status = DONE_STATUS.FINAL;
|
490 | tBuf.writeUInt16LE(status);
|
491 | tBuf.writeUInt16LE(0); // CurCmd (TDS ignores this)
|
492 | tBuf.writeUInt32LE(0); // row count - doesn't really matter
|
493 | if (this.options.tdsVersion >= '7_2') {
|
494 | tBuf.writeUInt32LE(0); // row count is 64 bits in >= TDS 7.2
|
495 | }
|
496 | return tBuf.data;
|
497 | }
|
498 |
|
499 | /**
|
500 | * @private
|
501 | */
|
502 | cancel() {
|
503 | if (this.canceled) {
|
504 | return;
|
505 | }
|
506 | this.canceled = true;
|
507 | this.emit('cancel');
|
508 | }
|
509 | }
|
510 | var _default = exports.default = BulkLoad;
|
511 | module.exports = BulkLoad;
|
512 | //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZXZlbnRzIiwicmVxdWlyZSIsIl93cml0YWJsZVRyYWNraW5nQnVmZmVyIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsIl9zdHJlYW0iLCJfdG9rZW4iLCJvYmoiLCJfX2VzTW9kdWxlIiwiZGVmYXVsdCIsIkZMQUdTIiwibnVsbGFibGUiLCJjYXNlU2VuIiwidXBkYXRlYWJsZVJlYWRXcml0ZSIsInVwZGF0ZWFibGVVbmtub3duIiwiaWRlbnRpdHkiLCJjb21wdXRlZCIsImZpeGVkTGVuQ0xSVHlwZSIsInNw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