Commit 9ef71506 authored by nanahira's avatar nanahira

support detailed query only

parent 96004378
...@@ -267,7 +267,7 @@ class DataManager { ...@@ -267,7 +267,7 @@ class DataManager {
.where("1"); .where("1");
if (roomName != null && roomName.length) { if (roomName != null && roomName.length) {
const escapedRoomName = this.getEscapedString(roomName); const escapedRoomName = this.getEscapedString(roomName);
queryBuilder.andWhere("duelLog.name like :escapedRoomName", { escapedRoomName }); queryBuilder.andWhere("duelLog.name = :escapedRoomName", { escapedRoomName });
} }
if (duelCount != null && !isNaN(duelCount)) { if (duelCount != null && !isNaN(duelCount)) {
queryBuilder.andWhere("duelLog.duelCount = :duelCount", { duelCount }); queryBuilder.andWhere("duelLog.duelCount = :duelCount", { duelCount });
...@@ -277,7 +277,7 @@ class DataManager { ...@@ -277,7 +277,7 @@ class DataManager {
const innerQueryParams = {}; const innerQueryParams = {};
if (playerName != null && playerName.length) { if (playerName != null && playerName.length) {
const escapedPlayerName = this.getEscapedString(playerName); const escapedPlayerName = this.getEscapedString(playerName);
innerQuery += " and duel_log_player.realName like :escapedPlayerName"; innerQuery += " and duel_log_player.realName = :escapedPlayerName";
innerQueryParams.escapedPlayerName = escapedPlayerName; innerQueryParams.escapedPlayerName = escapedPlayerName;
} }
if (playerScore != null && !isNaN(playerScore)) { if (playerScore != null && !isNaN(playerScore)) {
......
...@@ -275,7 +275,7 @@ export class DataManager { ...@@ -275,7 +275,7 @@ export class DataManager {
.where("1"); .where("1");
if(roomName != null && roomName.length) { if(roomName != null && roomName.length) {
const escapedRoomName = this.getEscapedString(roomName); const escapedRoomName = this.getEscapedString(roomName);
queryBuilder.andWhere("duelLog.name like :escapedRoomName", { escapedRoomName }); queryBuilder.andWhere("duelLog.name = :escapedRoomName", { escapedRoomName });
} }
if(duelCount != null && !isNaN(duelCount)) { if(duelCount != null && !isNaN(duelCount)) {
queryBuilder.andWhere("duelLog.duelCount = :duelCount", { duelCount }); queryBuilder.andWhere("duelLog.duelCount = :duelCount", { duelCount });
...@@ -285,7 +285,7 @@ export class DataManager { ...@@ -285,7 +285,7 @@ export class DataManager {
const innerQueryParams: any = {}; const innerQueryParams: any = {};
if(playerName != null && playerName.length) { if(playerName != null && playerName.length) {
const escapedPlayerName = this.getEscapedString(playerName); const escapedPlayerName = this.getEscapedString(playerName);
innerQuery += " and duel_log_player.realName like :escapedPlayerName"; innerQuery += " and duel_log_player.realName = :escapedPlayerName";
innerQueryParams.escapedPlayerName = escapedPlayerName; innerQueryParams.escapedPlayerName = escapedPlayerName;
} }
if(playerScore != null && !isNaN(playerScore)) { if(playerScore != null && !isNaN(playerScore)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment