org.proteios.core.query
Class Selects
java.lang.Object
org.proteios.core.query.Selects
public class Selects
- extends Object
A factory class to create select expressions.
- Version:
- 2.0
- Author:
- Nicklas
- Last modified
- $Date: 2009-04-09 08:48:11 +0200 (Thu, 09 Apr 2009) $
|
Field Summary |
static Pattern |
ALIAS_REGEXP
An alias can only contain the characters a-z, A-Z or 0-9. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALIAS_REGEXP
public static final Pattern ALIAS_REGEXP
- An alias can only contain the characters a-z, A-Z or 0-9.
Selects
public Selects()
expression
public static final Select expression(Expression e1,
String alias)
throws InvalidDataException
- Create a selection from an expression, optionally giving it an alias.
The alias can be used when getting the result to find the column
index. See
SqlResultIterator.getIndex(String).
SELECT <expression> AS <alias>
FROM ...
TODO - more example code
- Parameters:
e1 - The expression to selectalias - The alias to give the expression
- Returns:
- A selection query element
- Throws:
InvalidDataException - If the expression is null or if the
alias contains invalid characters