This commit is contained in:
@@ -120,7 +120,7 @@ namespace Sockeye.Biz
|
||||
var qTypeOnly=string.Empty;
|
||||
if(searchParameters.TypeOnly!=SockType.NoType){
|
||||
//INNER JOIN ASEARCHKEY ON ASEARCHDICTIONARY.ID = ASEARCHKEY.WORDID and asearchkey.sockType=20
|
||||
qTypeOnly=$"AND ASEARCHKEY.ATYPE={(int)searchParameters.TypeOnly}";
|
||||
qTypeOnly=$"AND ASEARCHKEY.SOCKTYPE={(int)searchParameters.TypeOnly}";
|
||||
}
|
||||
|
||||
q.Append($" FROM asearchdictionary INNER JOIN asearchkey ON asearchdictionary.id = asearchkey.wordid {qTypeOnly} GROUP BY asearchkey.objectid, asearchkey.sockType) SELECT sockType, objectid FROM qr WHERE ");
|
||||
@@ -634,7 +634,7 @@ namespace Sockeye.Biz
|
||||
{
|
||||
//Be careful in future, if you put ToString at the end of each object in the string interpolation
|
||||
//npgsql driver will assume it's a string and put quotes around it triggering an error that a string can't be compared to an int
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from asearchkey where objectid={objectID} and aType={(int)aType}");
|
||||
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from asearchkey where objectid={objectID} and socktype={(int)aType}");
|
||||
//nothing to save here, it's a direct command already executed
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user