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(
|
|
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
|
@@ -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
|
-
|
|
105
|
-
|
|
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
|