pg-manipulator 1.0.19 → 1.0.21

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.
@@ -38,7 +38,6 @@ class middleware {
38
38
  }
39
39
  get(fields) {
40
40
  return __awaiter(this, void 0, void 0, function* () {
41
- console.log(yield (new select_1.default(this.database, this.table, fields)).prepare());
42
41
  return yield (new select_1.default(this.database, this.table, fields)).prepare();
43
42
  });
44
43
  }
@@ -120,6 +120,7 @@ class select_factory {
120
120
  prepare() {
121
121
  return __awaiter(this, void 0, void 0, function* () {
122
122
  var _a;
123
+ console.log(this.fields);
123
124
  this.schema = (yield Promise.resolve(`${`../../mapping/${this.database}/${this.table}.js`}`).then(s => __importStar(require(s)))).default;
124
125
  this.params = [];
125
126
  this.query += 'SELECT ';
@@ -190,7 +191,6 @@ class select_factory {
190
191
  }
191
192
  }
192
193
  }
193
- console.log(this.query, this.params);
194
194
  return [this.query, this.params];
195
195
  });
196
196
  }
@@ -52,6 +52,7 @@ function where(database_1, table_1, fields_1, index_1, addQuery_1, addParam_1) {
52
52
  position = index;
53
53
  const schema = (yield Promise.resolve(`${`../../mapping/${database}/index.js`}`).then(s => __importStar(require(s)))).default[table];
54
54
  addQuery(initialized_clausule);
55
+ console.log(fields);
55
56
  for (let colum of schema.columns) {
56
57
  if (!fields || ['undefined', 'function'].indexOf(typeof fields[colum.name]) > -1) {
57
58
  continue;
@@ -180,6 +181,7 @@ function where(database_1, table_1, fields_1, index_1, addQuery_1, addParam_1) {
180
181
  }
181
182
  else if (fields[colum.name] !== null) {
182
183
  if (utils_1.texts.indexOf(colum.value.type) > -1) {
184
+ console.log(fields[colum.name]);
183
185
  addQuery(` ${initialized ? 'AND' : ''} ${table}.${colum.name} = $${position}`);
184
186
  addParam(fields[colum.name]);
185
187
  next();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pg-manipulator",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "postgresql database handler",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",