1 22 23 package org.xquark.extractor.sql; 24 25 import java.util.List ; 26 27 import org.xquark.extractor.algebra.Expression; 28 import org.xquark.extractor.algebra.ExternalVariable; 29 import org.xquark.jdbc.typing.DbType; 30 31 abstract public interface SqlFactory { 32 33 34 35 public SqlAttributeExpression createAttributeExpression(); 36 37 public SqlAttributeExpression createAttributeExpression(String tableInstance, String attribute); 38 39 public SqlBinOpArithmetic createBinOpArithmetic(); 40 41 public SqlBinOpArithmetic createBinOpArithmetic(int operator, SqlExpression leftOperand, SqlExpression rightOperand); 42 43 public SqlBinOpBoolean createBinOpBoolean(); 44 45 public SqlBinOpBoolean createBinOpBoolean(int operator, SqlExpression leftOperand, SqlExpression rightOperand); 46 47 public SqlBinOpCompare createBinOpCompare(); 48 49 public SqlBinOpCompare createBinOpCompare(int operator, SqlExpression leftOperand, SqlExpression rightOperand); 50 51 public SqlBinOpCompareAny createBinOpCompareAny() ; 52 53 public SqlBinOpCompareAny createBinOpCompareAny(int operator, SqlExpression leftOperand, SqlExpression rightOperand); 54 55 public SqlBinOpLike createBinOpLike(); 56 57 public SqlBinOpLike createBinOpLike(SqlExpression leftOperand, SqlExpression rightOperand, boolean not); 58 59 public SqlBinOpUnion createBinOpUnion(); 60 61 public SqlBinOpUnion createBinOpUnion(int operator, SqlExpression leftOperand, SqlExpression rightOperand); 62 63 public SqlConvert createConvert(); 64 65 public SqlConvert createConvert(SqlExpression expr, DbType originalType, DbType targetType); 66 67 public SqlPlaceHolder createPlaceHolder(ExternalVariable externalVariable); 68 69 public SqlIfThenElse createIfThenElse(); 70 71 public SqlIfThenElse createIfThenElse(SqlExpression iif, SqlExpression then, SqlExpression eslse); 72 73 public SqlJoin createJoin(); 74 75 public SqlJoin createJoin(List operandList); 76 77 public SqlUnOpExists createUnOpExists(); 78 79 public SqlUnOpExists createUnOpExists(SqlExpression query, boolean notExists); 80 81 public SqlUnOpIsNull createUnOpIsNull(); 82 83 public SqlUnOpIsNull createUnOpIsNull(SqlExpression expr, boolean notIsNull); 84 85 public SqlUnOpMinus createUnOpMinus(); 86 87 public SqlUnOpMinus createUnOpMinus(SqlExpression expr); 88 89 public SqlUnOpNot createUnOpNot(); 90 91 public SqlUnOpNot createUnOpNot(SqlExpression expr); 92 93 public SqlFunAggregate createFunAggregate(); 94 95 public SqlFunAggregate createFunAggregate(int operator, SqlExpression operand, boolean distinct); 96 97 public SqlBinOpIn createBinOpIn(); 98 99 public SqlBinOpIn createBinOpIn(SqlExpression leftOperand, SqlExpression rightOperand); 100 101 public SqlLitBoolean createLitBoolean(); 102 103 public SqlLitBoolean createLitBoolean(Boolean value); 104 105 public SqlLitDate createLitDate(); 106 107 public SqlLitDate createLitDate(java.sql.Date value); 108 109 public SqlLitDecimal createLitDecimal(); 110 111 public SqlLitDecimal createLitDecimal(java.math.BigDecimal value); 112 113 public SqlLitDouble createLitDouble(); 114 115 public SqlLitDouble createLitDouble(Double value); 116 117 public SqlLitFloat createLitFloat(); 118 119 public SqlLitFloat createLitFloat(Float value); 120 121 public SqlLitInteger createLitInteger(); 122 123 public SqlLitInteger createLitInteger(Integer value); 124 125 public SqlLitList createLitList(); 126 127 public SqlLitList createLitList(List litList); 128 129 public SqlLitString createLitString(); 130 131 public SqlLitString createLitString(String value); 132 133 public SqlLitNull createLitNull(); 134 135 public SqlSelect createSelect(Expression expr); 138 public SqlSortSpecification createSortSpecification(); 139 140 public SqlSortSpecification createSortSpecification(SqlExpression sortExpression, int sortDirection); 141 142 public SqlTable createTable(); 143 144 public SqlTable createTable(String name); 145 146 public SqlTable createTable(String catalogName, String schemaName, String tableName); 147 148 149 public SqlRenameItem createRenameItem(); 150 151 public SqlRenameItem createRenameItem(SqlExpression expr, String name); 152 153 public SqlRenameRelation createRenameRelation(); 154 155 public SqlRenameRelation createRenameRelation(SqlExpression relation,String alias); 156 157 158 public SfAbs createSfAbs(); 159 160 public SfAbs createSfAbs(SqlExpression arg0); 161 162 public SfCeiling createSfCeiling(); 163 164 public SfCeiling createSfCeiling(SqlExpression arg0); 165 166 public SfConcat createSfConcat(); 167 168 public SfConcat createSfConcat(List list); 169 170 public SfContains createSfContains(); 171 172 public SfContains createSfContains(SqlExpression arg0, SqlExpression arg1); 173 174 public SfCurrentDateTime createSfCurrentDateTime(); 175 176 177 public SfFloor createSfFloor(); 178 179 public SfFloor createSfFloor(SqlExpression arg0); 180 181 public SfLowerCase createSfLowerCase(); 182 183 public SfLowerCase createSfLowerCase(SqlExpression arg0); 184 185 public SfRound createSfRound(); 186 187 public SfRound createSfRound(SqlExpression arg0); 188 189 public SfSign createSfSign(); 190 191 public SfSign createSfSign(SqlExpression arg0); 192 193 public SfStringLength createSfStringLength(); 194 195 public SfStringLength createSfStringLength(SqlExpression arg0); 196 197 public SfSubString createSfSubString(); 198 199 public SfSubString createSfSubString(SqlExpression arg0, SqlExpression arg1); 200 201 213 public SfTrim createSfTrim(); 214 215 public SfTrim createSfTrim(SqlExpression arg0); 216 217 public SfUpperCase createSfUpperCase(); 218 219 public SfUpperCase createSfUpperCase(SqlExpression arg0); 220 } 221 | Popular Tags |