[
https://issues.apache.org/jira/browse/METAMODEL-135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14513176#comment-14513176
]
Kasper Sørensen commented on METAMODEL-135:
-------------------------------------------
Oh and If you want the filter item as a string, use toSql()
> SQL parsing fails when 'AND' or 'OR' keywords are in caps
> ---------------------------------------------------------
>
> Key: METAMODEL-135
> URL: https://issues.apache.org/jira/browse/METAMODEL-135
> Project: Apache MetaModel
> Issue Type: Task
> Reporter: Ashish Mukherjee
>
> This is what my client code is:
> DataContext dataContext = new SolrDataContext(url, index);
> DataSet dataSet = dataContext
> .executeQuery("SELECT price FROM collection1 WHERE (((manu =
> 'Samsung') AND name = 'hard'))");
> In my SolrDataContext class:
> FilterClause clause = q.getWhereClause();
> if (clause != null) {
> List<FilterItem> filterItemList = clause.getItems();
> boolean isFirst = true;
>
> for (FilterItem filterItem : filterItemList) {
> String expr = filterItem.getExpression();
> System.out.println(expr);
> ....
> expr is null when 'AND' is in caps but gives the correct expression when it
> is written as 'and' in the query. Same is true for 'OR' and 'or'. Looks like
> the parsing is case-sensitive somewhere.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)