mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged CMIS063 to HEAD
16940: CMIS Query: MOB-566: Tightened up antlr parse (stopped any auto recovery) 16967: MOB-1330: Upgrade Web Services Repository to 0.7 16969: CMIS Query exception reporting improvements and tighter lexingr16974: CMIS Query: Tidy ups for score 16984: CMIS 0.7 upgrade - checkpoint. 16995: CMIS 0.7 upgrade - checkpoint: 16996: Rename changes list to reflect update to 0.7 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17244 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -79,11 +79,9 @@ import org.alfresco.repo.search.impl.querymodel.impl.functions.In;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.LessThan;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.LessThanOrEquals;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Like;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Lower;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.NotEquals;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.PropertyAccessor;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Score;
|
||||
import org.alfresco.repo.search.impl.querymodel.impl.functions.Upper;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
@@ -732,7 +730,20 @@ public class CMISQueryParser
|
||||
int start = getStringPosition(query, functionNode.getLine(), functionNode.getCharPositionInLine());
|
||||
int end = getStringPosition(query, rparenNode.getLine(), rparenNode.getCharPositionInLine());
|
||||
|
||||
String alias = query.substring(start, end + 1);
|
||||
String alias;
|
||||
if(function.getName().equals(Score.NAME))
|
||||
{
|
||||
alias = "SEARCH_SCORE";
|
||||
// check no args
|
||||
if (functionNode.getChildCount() > 3)
|
||||
{
|
||||
throw new CMISQueryException("The function SCORE() is not allowed any arguments");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alias = query.substring(start, end + 1);
|
||||
}
|
||||
if (columnNode.getChildCount() > 1)
|
||||
{
|
||||
alias = columnNode.getChild(1).getText();
|
||||
|
Reference in New Issue
Block a user