gg-mysql-connector 1.0.121 → 1.0.122
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 ${tableName}
|
|
40
|
+
const result = (await this.query(`SELECT * FROM ${tableName} WHERE ? <= ? AND ? <= ?`, [startDate, columnName, columnName, endDate], false));
|
|
41
41
|
return result;
|
|
42
42
|
}
|
|
43
43
|
async createDatabaseIfNotExist(tempConnection) {
|
package/package.json
CHANGED
|
@@ -101,7 +101,7 @@ 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 ${tableName}
|
|
104
|
+
`SELECT * FROM ${tableName} WHERE ? <= ? AND ? <= ?`,
|
|
105
105
|
[startDate, columnName, columnName, endDate],
|
|
106
106
|
false
|
|
107
107
|
)) as Main[T][]
|