本文整理汇总了Java中gudusoft.gsqlparser.EExpressionType.arithmetic_minus_t方法的典型用法代码示例。如果您正苦于以下问题:Java EExpressionType.arithmetic_minus_t方法的具体用法?Java EExpressionType.arithmetic_minus_t怎么用?Java EExpressionType.arithmetic_minus_t使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gudusoft.gsqlparser.EExpressionType
的用法示例。
在下文中一共展示了EExpressionType.arithmetic_minus_t方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isIntervalValueExpression
import gudusoft.gsqlparser.EExpressionType; //导入方法依赖的package包/类
private boolean isIntervalValueExpression( TExpression expression )
{
if ( expression.getExpressionType( ) == EExpressionType.arithmetic_plus_t
|| expression.getExpressionType( ) == EExpressionType.arithmetic_minus_t )
{
if ( expression.getLeftOperand( ) != null )
return isIntervalValueExpression( expression.getLeftOperand( ) );
else
return false;
}
else if ( expression.getExpressionType( ) == EExpressionType.simple_constant_t )
{
if ( Utility.isIntervalTypeValue( expression.toString( ) ) )
{
return true;
}
}
return false;
}
示例2: convertExpressionToNumericValueExpression
import gudusoft.gsqlparser.EExpressionType; //导入方法依赖的package包/类
private void convertExpressionToNumericValueExpression(
TExpression expression,
numeric_value_expression numericValueExpression )
{
if ( expression.getExpressionType( ) == EExpressionType.arithmetic_plus_t )
{
plus plus = new plus( );
numericValueExpression.setPlus( plus );
convertExpressionToPlus( expression, plus );
}
else if ( expression.getExpressionType( ) == EExpressionType.arithmetic_minus_t )
{
minus minus = new minus( );
numericValueExpression.setMinus( minus );
convertExpressionToMinus( expression, minus );
}
else
{
term term = new term( );
numericValueExpression.setTerm( term );
convertExpressionToTerm( expression, term );
}
}
示例3: convertExpressionToDatetimeValueExpression
import gudusoft.gsqlparser.EExpressionType; //导入方法依赖的package包/类
private void convertExpressionToDatetimeValueExpression(
TExpression expression,
datetime_value_expression datetimeValueExpression )
{
if ( expression.getExpressionType( ) == EExpressionType.arithmetic_plus_t )
{
if ( isDateTypeValueExpression( expression.getLeftOperand( ) ) )
{
datetime_value_expression_plus_interval_term datetimeValuePlusExpression = new datetime_value_expression_plus_interval_term( );
datetimeValueExpression.setDatetime_value_expression_plus_interval_term( datetimeValuePlusExpression );
convertExpressionToDatetimeValueExpression( expression.getLeftOperand( ),
datetimeValuePlusExpression.getDatetime_value_expression( ) );
convertExpressionToIntervalTerm( expression.getRightOperand( ),
datetimeValuePlusExpression.getInterval_term( ) );
}
}
else if ( expression.getExpressionType( ) == EExpressionType.arithmetic_minus_t )
{
if ( isDateTypeValueExpression( expression.getLeftOperand( ) ) )
{
datetime_value_expression_minus_interval_term datetimeValueMinusExpression = new datetime_value_expression_minus_interval_term( );
datetimeValueExpression.setDatetime_value_expression_minus_interval_term( datetimeValueMinusExpression );
convertExpressionToDatetimeValueExpression( expression.getLeftOperand( ),
datetimeValueMinusExpression.getDatetime_value_expression( ) );
convertExpressionToIntervalTerm( expression.getRightOperand( ),
datetimeValueMinusExpression.getInterval_term( ) );
}
}
else
{
datetime_term datetimeTerm = new datetime_term( );
datetimeValueExpression.setDatetime_term( datetimeTerm );
convertExpressionToDateTimeFactor( expression,
datetimeTerm.getDatetime_factor( ) );
}
}
示例4: isNumericValueExpression
import gudusoft.gsqlparser.EExpressionType; //导入方法依赖的package包/类
private boolean isNumericValueExpression( TExpression expression )
{
if ( expression.getExpressionType( ) == EExpressionType.arithmetic_plus_t
|| expression.getExpressionType( ) == EExpressionType.arithmetic_minus_t
|| expression.getExpressionType( ) == EExpressionType.arithmetic_divide_t
|| expression.getExpressionType( ) == EExpressionType.arithmetic_times_t
|| expression.getExpressionType( ) == EExpressionType.unary_plus_t
|| expression.getExpressionType( ) == EExpressionType.unary_minus_t )
{
if ( expression.getLeftOperand( ) != null )
{
boolean isDateType = isDateTypeValueExpression( expression.getLeftOperand( ) );
if ( isDateType )
return false;
}
return true;
}
else if ( expression.getExpressionType( ) == EExpressionType.simple_constant_t )
{
if ( Utility.isNumber( expression.toString( ) ) )
{
return true;
}
}
else if ( expression.getExpressionType( ) == EExpressionType.function_t )
{
String functionName = expression.getFunctionCall( )
.getFunctionName( )
.toString( );
if ( Utility.isNumericValueFunction( functionName )
|| Utility.isAggregateFunction( functionName ) )
{
return true;
}
}
return false;
}