gg-mysql-connector 1.0.121 → 1.0.123

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.
@@ -37,7 +37,9 @@ class GGMySQLConnector {
37
37
  */
38
38
  async selectByDateRange(tableName, params) {
39
39
  const { columnName, endDate, startDate } = params;
40
- const result = (await this.query(`SELECT ${tableName} FROM ? WHERE ? <= ? AND ? <= ?`, [startDate, columnName, columnName, endDate], false));
40
+ const result = (await this.query(
41
+ //@ts-ignore
42
+ `SELECT * FROM ${tableName} WHERE ? <= ${columnName} AND ${columnName} <= ?`, [startDate, endDate], false));
41
43
  return result;
42
44
  }
43
45
  async createDatabaseIfNotExist(tempConnection) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gg-mysql-connector",
3
- "version": "1.0.121",
3
+ "version": "1.0.123",
4
4
  "description": "",
5
5
  "main": "dist/src/index.js",
6
6
  "scripts": {
@@ -100,9 +100,11 @@ export default class GGMySQLConnector<Main> implements ClassDBInterface<Main> {
100
100
  }
101
101
  ): Promise<Main[T][]> {
102
102
  const { columnName, endDate, startDate } = params
103
+
103
104
  const result = (await this.query(
104
- `SELECT ${tableName} FROM ? WHERE ? <= ? AND ? <= ?`,
105
- [startDate, columnName, columnName, endDate],
105
+ //@ts-ignore
106
+ `SELECT * FROM ${tableName} WHERE ? <= ${columnName} AND ${columnName} <= ?`,
107
+ [startDate, endDate],
106
108
  false
107
109
  )) as Main[T][]
108
110
  return result