pg-mvc-service 2.0.99 → 2.0.100
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.
|
@@ -375,17 +375,24 @@ class WhereExpression {
|
|
|
375
375
|
*/
|
|
376
376
|
static makeSqlNormalizeCharVariants(expression, replaceOption) {
|
|
377
377
|
var _a;
|
|
378
|
-
if (replaceOption
|
|
378
|
+
if (replaceOption === true) {
|
|
379
|
+
replaceOption = {
|
|
380
|
+
halfToFull: true,
|
|
381
|
+
hiraganaToKatakana: true,
|
|
382
|
+
numeric: true
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
if ((replaceOption === null || replaceOption === void 0 ? void 0 : replaceOption.numeric) === true) {
|
|
379
386
|
replaceOption.numeric = {
|
|
380
387
|
japanese: true
|
|
381
388
|
};
|
|
382
389
|
}
|
|
383
390
|
const objs = {};
|
|
384
|
-
if (replaceOption.hiraganaToKatakana === true) {
|
|
391
|
+
if ((replaceOption === null || replaceOption === void 0 ? void 0 : replaceOption.hiraganaToKatakana) === true) {
|
|
385
392
|
objs['あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんゔがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょっー、。・「」゛゜']
|
|
386
393
|
= 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポァィゥェォャュョッー、。・「」゛゜';
|
|
387
394
|
}
|
|
388
|
-
if (((_a = replaceOption.numeric) === null || _a === void 0 ? void 0 : _a.japanese) === true) {
|
|
395
|
+
if (((_a = replaceOption === null || replaceOption === void 0 ? void 0 : replaceOption.numeric) === null || _a === void 0 ? void 0 : _a.japanese) === true) {
|
|
389
396
|
objs['零〇'] = '00';
|
|
390
397
|
objs['一壱弌'] = '111';
|
|
391
398
|
objs['二弐'] = '22';
|
|
@@ -397,7 +404,7 @@ class WhereExpression {
|
|
|
397
404
|
objs['八捌'] = '88';
|
|
398
405
|
objs['九玖'] = '99';
|
|
399
406
|
}
|
|
400
|
-
if (replaceOption.halfToFull === true) {
|
|
407
|
+
if ((replaceOption === null || replaceOption === void 0 ? void 0 : replaceOption.halfToFull) === true) {
|
|
401
408
|
objs['0123456789'] = '0123456789';
|
|
402
409
|
objs['アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポァィゥェォャュョッー、。・「」゛゜']
|
|
403
410
|
= 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドハハビブベボパピプペポァィゥェォャュョッー、。・「」 ゙ ゚';
|
package/package.json
CHANGED
|
@@ -405,23 +405,31 @@ export default class WhereExpression {
|
|
|
405
405
|
* @param {string} columnName Column name
|
|
406
406
|
* @returns SQL statement
|
|
407
407
|
*/
|
|
408
|
-
public static makeSqlNormalizeCharVariants(expression: string, replaceOption
|
|
408
|
+
public static makeSqlNormalizeCharVariants(expression: string, replaceOption?: true | {
|
|
409
409
|
halfToFull?: boolean; hiraganaToKatakana?: boolean;
|
|
410
410
|
numeric?: true | { japanese?: boolean; }
|
|
411
411
|
}) {
|
|
412
|
-
if (replaceOption
|
|
412
|
+
if (replaceOption === true) {
|
|
413
|
+
replaceOption = {
|
|
414
|
+
halfToFull: true,
|
|
415
|
+
hiraganaToKatakana: true,
|
|
416
|
+
numeric: true
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
if (replaceOption?.numeric === true) {
|
|
413
421
|
replaceOption.numeric = {
|
|
414
422
|
japanese: true
|
|
415
423
|
}
|
|
416
424
|
}
|
|
417
425
|
|
|
418
426
|
const objs: { [key: string]: string } = {}
|
|
419
|
-
if (replaceOption
|
|
427
|
+
if (replaceOption?.hiraganaToKatakana === true) {
|
|
420
428
|
objs['あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんゔがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょっー、。・「」゛゜']
|
|
421
429
|
= 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポァィゥェォャュョッー、。・「」゛゜';
|
|
422
430
|
}
|
|
423
431
|
|
|
424
|
-
if (replaceOption
|
|
432
|
+
if (replaceOption?.numeric?.japanese === true) {
|
|
425
433
|
objs['零〇'] = '00';
|
|
426
434
|
objs['一壱弌'] = '111';
|
|
427
435
|
objs['二弐'] = '22';
|
|
@@ -434,7 +442,7 @@ export default class WhereExpression {
|
|
|
434
442
|
objs['九玖'] = '99';
|
|
435
443
|
}
|
|
436
444
|
|
|
437
|
-
if (replaceOption
|
|
445
|
+
if (replaceOption?.halfToFull === true) {
|
|
438
446
|
objs['0123456789'] = '0123456789';
|
|
439
447
|
objs['アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポァィゥェォャュョッー、。・「」゛゜']
|
|
440
448
|
= 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンヴガギグゲゴザジズゼゾダヂヅデドハハビブベボパピプペポァィゥェォャュョッー、。・「」 ゙ ゚';
|