triangle-utils 1.4.154 → 1.4.156

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -154,7 +154,9 @@ export class UtilsRDS {
154
154
  }
155
155
  catch (error) {
156
156
  console.log(error.stack);
157
- console.log(sql);
157
+ if (options.is_verbose) {
158
+ console.log(sql);
159
+ }
158
160
  return;
159
161
  }
160
162
  }
@@ -168,11 +170,12 @@ export class UtilsRDS {
168
170
  const sql = "INSERT INTO " + table_id + " (" + attribute_names.join(", ") + ")" + " VALUES " + items.slice(i, i + batch_num_items).map(item => "(" + attribute_names.map(attribute_name => convert_rds_input(item[attribute_name])).join(", ") + ")").join(", ") + " ON CONFLICT ON CONSTRAINT " + table_id + "_pkey DO NOTHING;";
169
171
  try {
170
172
  await this.exec(sql, options);
171
- return;
172
173
  }
173
174
  catch (error) {
174
175
  console.log(error.stack);
175
- console.log(sql);
176
+ if (options.is_verbose) {
177
+ console.log(sql);
178
+ }
176
179
  return;
177
180
  }
178
181
  }
@@ -186,7 +189,9 @@ export class UtilsRDS {
186
189
  }
187
190
  catch (error) {
188
191
  console.log(error.stack);
189
- console.log(sql);
192
+ if (options.is_verbose) {
193
+ console.log(sql);
194
+ }
190
195
  return;
191
196
  }
192
197
  }
@@ -203,7 +208,9 @@ export class UtilsRDS {
203
208
  }
204
209
  catch (error) {
205
210
  console.log(error.stack);
206
- console.log(sql);
211
+ if (options.is_verbose) {
212
+ console.log(sql);
213
+ }
207
214
  return;
208
215
  }
209
216
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.4.154",
3
+ "version": "1.4.156",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
package/src/UtilsRDS.ts CHANGED
@@ -212,7 +212,9 @@ export class UtilsRDS {
212
212
  return items
213
213
  } catch (error : any) {
214
214
  console.log(error.stack)
215
- console.log(sql)
215
+ if (options.is_verbose) {
216
+ console.log(sql)
217
+ }
216
218
  return
217
219
  }
218
220
  }
@@ -235,10 +237,11 @@ export class UtilsRDS {
235
237
  const sql = "INSERT INTO " + table_id + " (" + attribute_names.join(", ") + ")" + " VALUES " + items.slice(i, i + batch_num_items).map(item => "(" + attribute_names.map(attribute_name => convert_rds_input(item[attribute_name])).join(", ") + ")").join(", ") + " ON CONFLICT ON CONSTRAINT " + table_id + "_pkey DO NOTHING;"
236
238
  try {
237
239
  await this.exec(sql, options)
238
- return
239
240
  } catch (error : any) {
240
241
  console.log(error.stack)
241
- console.log(sql)
242
+ if (options.is_verbose) {
243
+ console.log(sql)
244
+ }
242
245
  return
243
246
  }
244
247
  }
@@ -259,7 +262,9 @@ export class UtilsRDS {
259
262
  return items
260
263
  } catch (error : any) {
261
264
  console.log(error.stack)
262
- console.log(sql)
265
+ if (options.is_verbose) {
266
+ console.log(sql)
267
+ }
263
268
  return
264
269
  }
265
270
  }
@@ -284,7 +289,9 @@ export class UtilsRDS {
284
289
  await this.exec(sql, options)
285
290
  } catch (error : any) {
286
291
  console.log(error.stack)
287
- console.log(sql)
292
+ if (options.is_verbose) {
293
+ console.log(sql)
294
+ }
288
295
  return
289
296
  }
290
297
  }