当前位置: 首页>>代码示例>>Java>>正文


Java EExpressionType.arithmetic_minus_t方法代码示例

本文整理汇总了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;
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:20,代码来源:AnsiGenerator.java

示例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 );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:24,代码来源:AnsiGenerator.java

示例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( ) );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:37,代码来源:AnsiGenerator.java

示例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;
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:38,代码来源:AnsiGenerator.java


注:本文中的gudusoft.gsqlparser.EExpressionType.arithmetic_minus_t方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。