org.mmbase.util
Class QueryConvertor
java.lang.Object
|
+--org.mmbase.util.QueryConvertor
- public class QueryConvertor
- extends java.lang.Object
Class for the converion of a expression string to a SQL where clause.
The expressions string is expected to be in 'altavista' format.
This means that logical operators are identified by '+' (AND), '-' (NOT),
and '|' (OR).
Comparative operators are the same as those used in SCAN (i.e. '=E', '=N', etc)
A wildcarded strings (with '*' or '?' characters) are automatically converted
to a LIKE expression.
The resulting converted expression is preceded with the SQL 'WHERE ' keyword.
Note that if the expression to convert starts with "WHERE", it is not converted at all,
but returned as is.
- Version:
- 13 Apr 2001
- Author:
- Daniel Ockeloen, Pierre van Rooden (javadocs)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
database
public static MMJdbc2NodeInterface database
- Database used to convert invalid fieldnames (i.e.e keywords) to valid ones.
QueryConvertor
public QueryConvertor()
altaVista2SQL
public static java.lang.String altaVista2SQL(java.lang.String query,
MMJdbc2NodeInterface db)
- Creates the queryconverter
altaVista2SQL
public static java.lang.String altaVista2SQL(java.lang.String query)
- Creates the queryconverter
MMBase 2002