本文整理汇总了Java中net.sf.jsqlparser.expression.SignedExpression类的典型用法代码示例。如果您正苦于以下问题:Java SignedExpression类的具体用法?Java SignedExpression怎么用?Java SignedExpression使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SignedExpression类属于net.sf.jsqlparser.expression包,在下文中一共展示了SignedExpression类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression value)
{
Expression underlyingValue = value.getExpression();
if (underlyingValue instanceof DoubleValue)
{
DoubleValue doubleValue = (DoubleValue) underlyingValue;
doubleValue.setValue(value.getSign() == '-' ? -doubleValue.getValue() : doubleValue.getValue());
visit(doubleValue);
}
else if (underlyingValue instanceof LongValue)
{
LongValue longValue = (LongValue) underlyingValue;
longValue.setValue(value.getSign() == '-' ? -longValue.getValue() : longValue.getValue());
visit(longValue);
}
else
{
super.visit(value);
}
}
开发者ID:olavloite,项目名称:spanner-jdbc,代码行数:22,代码来源:AbstractSpannerExpressionVisitorAdapter.java
示例2: resolveValue
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
private static Object resolveValue(Expression expression, boolean allowColumn) throws StatementExecutionException {
if (expression instanceof JdbcParameter) {
throw new StatementExecutionException("jdbcparameter expression not usable in this query");
} else if (allowColumn && expression instanceof net.sf.jsqlparser.schema.Column) {
// this is only for supporting back ticks in DDL
return ((net.sf.jsqlparser.schema.Column) expression).getColumnName();
} else if (expression instanceof StringValue) {
return ((StringValue) expression).getValue();
} else if (expression instanceof LongValue) {
return ((LongValue) expression).getValue();
} else if (expression instanceof TimestampValue) {
return ((TimestampValue) expression).getValue();
} else if (expression instanceof SignedExpression) {
SignedExpression se = (SignedExpression) expression;
switch (se.getSign()) {
case '+': {
return resolveValue(se.getExpression(), allowColumn);
}
case '-': {
Object value = resolveValue(se.getExpression(), allowColumn);
if (value == null) {
return null;
}
if (value instanceof Integer) {
return -1L * ((Integer) value);
} else if (value instanceof Long) {
return -1L * ((Long) value);
} else {
throw new StatementExecutionException("unsupported value type " + expression.getClass() + " with sign " + se.getSign() + " on value " + value + " of type " + value.getClass());
}
}
default:
throw new StatementExecutionException("unsupported value type " + expression.getClass() + " with sign " + se.getSign());
}
} else {
throw new StatementExecutionException("unsupported value type " + expression.getClass());
}
}
开发者ID:diennea,项目名称:herddb,代码行数:40,代码来源:SQLPlanner.java
示例3: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression signedExpression) {
buffer.append(signedExpression.getSign());
signedExpression.getExpression().accept(this);
}
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:6,代码来源:ExpressionDeParser.java
示例4: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression signedExpression) {
signedExpression.getExpression().accept(this);
}
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:TablesNamesFinder.java
示例5: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression signedExpression) {
// TODO Auto-generated method stub
}
开发者ID:devpage,项目名称:sharding-quickstart,代码行数:6,代码来源:TablesNamesFinder.java
示例6: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression se) {
se.getExpression().accept(this);
}
开发者ID:diennea,项目名称:herddb,代码行数:5,代码来源:ColumnReferencesDiscovery.java
示例7: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression signedExpression) {
context.setNegative('-' == signedExpression.getSign());
signedExpression.getExpression().accept(this);
context.setNegative(false);
}
开发者ID:RapturePlatform,项目名称:Rapture,代码行数:7,代码来源:PreparedExpressionConverter.java
示例8: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
public void visit(SignedExpression signedExpression) {
}
开发者ID:scouter-project,项目名称:scouter,代码行数:3,代码来源:TableFinder.java
示例9: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression arg0) {
isSimple = false;
}
开发者ID:coastland,项目名称:gsp-dba-maven-plugin,代码行数:6,代码来源:ViewAnalyzer.java
示例10: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression signed)
{
throw new UnsupportedSqlExpressionException("SIGNED"); //$NON-NLS-1$
}
开发者ID:obidea,项目名称:semantika,代码行数:6,代码来源:SelectItemHandler.java
示例11: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression signed)
{
throw new IllegalOperationException("Illegal SQL ON expression: " + signed); //$NON-NLS-1$
}
开发者ID:obidea,项目名称:semantika,代码行数:6,代码来源:JoinConditionHandler.java
示例12: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression se) {
}
开发者ID:valdasraps,项目名称:resthub,代码行数:4,代码来源:AbstractExpressionParser.java
示例13: visit
import net.sf.jsqlparser.expression.SignedExpression; //导入依赖的package包/类
@Override
public void visit(SignedExpression signedExpression) {
}
开发者ID:ormanli,项目名称:SQL2NoSQL,代码行数:5,代码来源:SQLVisitor.java
注:本文中的net.sf.jsqlparser.expression.SignedExpression类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论