1 | package org.sqlorm.querybuilder; |
2 | |
3 | /** |
4 | * represents an argument already resolved into a string |
5 | * |
6 | * @author kasper graversen |
7 | */ |
8 | // TODO should store the object arrays instead in here rather than the string, so that he output can be properly |
9 | // formated in case a nested select is used.. |
10 | class ExprString implements IPositionAndOr { |
11 | |
12 | private final String someSql; |
13 | |
14 | public ExprString(final String someSql) { |
15 | this.someSql = someSql; |
16 | } |
17 | |
18 | @Override |
19 | public boolean equals(final Object other) { |
20 | if(other instanceof ExprString == false) { |
21 | return false; |
22 | } |
23 | final ExprString o = (ExprString) other; |
24 | return someSql.equals(o.someSql); |
25 | } |
26 | |
27 | public void toSql(final StringBuilder sb, final String indent) { |
28 | sb.append(someSql); |
29 | } |
30 | } |