This commit is contained in:
@@ -176,15 +176,20 @@ namespace AyaNova.PickList
|
||||
sb.Append(ActiveSelectFragment);
|
||||
sb.Append(", ");
|
||||
|
||||
//nope, this will return null if any of the values are null, very bad for this use, instead
|
||||
//select name || ' ' || serial || ' ' || array_to_string(tags,',') as display from awidget
|
||||
//this, on the other hand will work even if all of them are null
|
||||
//concat_ws(' ', awidget.name, awidget.serial, auser.name)
|
||||
|
||||
sb.Append("concat_ws(' ', ");
|
||||
foreach (string s in lSelect)
|
||||
{
|
||||
sb.Append(s);
|
||||
sb.Append(" || ' ' || ");//sb 11 characters
|
||||
sb.Append(",");
|
||||
}
|
||||
//clear trailing concat element
|
||||
sb.Length -= 11;//length of last concat fragment above
|
||||
sb.Append(" as plname");
|
||||
//clear trailing comma
|
||||
sb.Length -= 1;
|
||||
sb.Append(") as plname");
|
||||
|
||||
//FROM
|
||||
sb.Append(" ");
|
||||
@@ -223,13 +228,16 @@ namespace AyaNova.PickList
|
||||
|
||||
|
||||
sb.Append(")");
|
||||
}else{
|
||||
//we might have a trailing and to remove
|
||||
//jesus this stuff sucks, there must be a better way, it seems so fragile
|
||||
if(!IncludeInactive || HasTagSpecificQuery){
|
||||
//trailing " and " to remove
|
||||
sb.Length-=5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//we might have a trailing and to remove
|
||||
//jesus this stuff sucks, there must be a better way, it seems so fragile
|
||||
if (!IncludeInactive || HasTagSpecificQuery)
|
||||
{
|
||||
//trailing " and " to remove
|
||||
sb.Length -= 5;
|
||||
}
|
||||
}
|
||||
|
||||
//ORDER BY
|
||||
|
||||
Reference in New Issue
Block a user