midway-fatcms 0.0.1-beta.11 → 0.0.1-beta.12
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.
|
@@ -193,28 +193,28 @@ class CrudProGenSqlCondition {
|
|
|
193
193
|
tmpArgList.push(value0);
|
|
194
194
|
tmpSql = `${toSqlColumnName(key)} COLLATE UTF8MB4_GENERAL_CI like concat(?, '%')`; // like前缀匹配
|
|
195
195
|
if (this.sqlCfg.sqlDbType === keys_1.SqlDbType.postgres) {
|
|
196
|
-
tmpSql = `${toSqlColumnName(key)} like concat(
|
|
196
|
+
tmpSql = `${toSqlColumnName(key)} like concat(?::text, '%')`; // like前缀匹配
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
else if (equalsIgnoreCase(keys_1.KeysOfConditions.$NOT_LIKE, compare)) {
|
|
200
200
|
tmpArgList.push(value0);
|
|
201
201
|
tmpSql = `${toSqlColumnName(key)} COLLATE UTF8MB4_GENERAL_CI not like concat(?, '%')`;
|
|
202
202
|
if (this.sqlCfg.sqlDbType === keys_1.SqlDbType.postgres) {
|
|
203
|
-
tmpSql = `${toSqlColumnName(key)} not like concat(
|
|
203
|
+
tmpSql = `${toSqlColumnName(key)} not like concat(?::text, '%')`;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
else if (equalsIgnoreCase(keys_1.KeysOfConditions.$LIKE_INCLUDE, compare)) {
|
|
207
207
|
tmpArgList.push(value0);
|
|
208
208
|
tmpSql = `${toSqlColumnName(key)} COLLATE UTF8MB4_GENERAL_CI like concat('%', ?, '%')`; // like包含
|
|
209
209
|
if (this.sqlCfg.sqlDbType === keys_1.SqlDbType.postgres) {
|
|
210
|
-
tmpSql = `${toSqlColumnName(key)} like concat('%',
|
|
210
|
+
tmpSql = `${toSqlColumnName(key)} like concat('%', ?::text, '%')`; // like包含
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
else if (equalsIgnoreCase(keys_1.KeysOfConditions.$NOT_LIKE_INCLUDE, compare)) {
|
|
214
214
|
tmpArgList.push(value0);
|
|
215
215
|
tmpSql = `${toSqlColumnName(key)} COLLATE UTF8MB4_GENERAL_CI not like concat('%',?, '%')`; // like不包含
|
|
216
216
|
if (this.sqlCfg.sqlDbType === keys_1.SqlDbType.postgres) {
|
|
217
|
-
tmpSql = `${toSqlColumnName(key)} not like concat('%'
|
|
217
|
+
tmpSql = `${toSqlColumnName(key)} not like concat('%',?::text, '%')`; // like不包含
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
else if (equalsIgnoreCase(keys_1.KeysOfConditions.$MATCH, compare)) {
|
package/package.json
CHANGED
|
@@ -213,7 +213,7 @@ class CrudProGenSqlCondition {
|
|
|
213
213
|
tmpSql = `${toSqlColumnName(key)} COLLATE UTF8MB4_GENERAL_CI like concat(?, '%')`; // like前缀匹配
|
|
214
214
|
|
|
215
215
|
if (this.sqlCfg.sqlDbType === SqlDbType.postgres) {
|
|
216
|
-
tmpSql = `${toSqlColumnName(key)} like concat(
|
|
216
|
+
tmpSql = `${toSqlColumnName(key)} like concat(?::text, '%')`; // like前缀匹配
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
} else if (equalsIgnoreCase(KeysOfConditions.$NOT_LIKE, compare)) {
|
|
@@ -222,7 +222,7 @@ class CrudProGenSqlCondition {
|
|
|
222
222
|
|
|
223
223
|
|
|
224
224
|
if (this.sqlCfg.sqlDbType === SqlDbType.postgres) {
|
|
225
|
-
tmpSql = `${toSqlColumnName(key)} not like concat(
|
|
225
|
+
tmpSql = `${toSqlColumnName(key)} not like concat(?::text, '%')`;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
228
|
}
|
|
@@ -233,7 +233,7 @@ class CrudProGenSqlCondition {
|
|
|
233
233
|
tmpSql = `${toSqlColumnName(key)} COLLATE UTF8MB4_GENERAL_CI like concat('%', ?, '%')`; // like包含
|
|
234
234
|
|
|
235
235
|
if (this.sqlCfg.sqlDbType === SqlDbType.postgres) {
|
|
236
|
-
tmpSql = `${toSqlColumnName(key)} like concat('%',
|
|
236
|
+
tmpSql = `${toSqlColumnName(key)} like concat('%', ?::text, '%')`; // like包含
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
} else if (equalsIgnoreCase(KeysOfConditions.$NOT_LIKE_INCLUDE, compare)) {
|
|
@@ -241,7 +241,7 @@ class CrudProGenSqlCondition {
|
|
|
241
241
|
tmpSql = `${toSqlColumnName(key)} COLLATE UTF8MB4_GENERAL_CI not like concat('%',?, '%')`; // like不包含
|
|
242
242
|
|
|
243
243
|
if (this.sqlCfg.sqlDbType === SqlDbType.postgres) {
|
|
244
|
-
tmpSql = `${toSqlColumnName(key)} not like concat('%'
|
|
244
|
+
tmpSql = `${toSqlColumnName(key)} not like concat('%',?::text, '%')`; // like不包含
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
}
|