gg-mysql-connector 1.0.120 → 1.0.121

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