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


Java EExpressionType类代码示例

本文整理汇总了Java中gudusoft.gsqlparser.EExpressionType的典型用法代码示例。如果您正苦于以下问题:Java EExpressionType类的具体用法?Java EExpressionType怎么用?Java EExpressionType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EExpressionType类属于gudusoft.gsqlparser包,在下文中一共展示了EExpressionType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: checkHelper

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
protected void checkHelper(TExpression condition, HashSet<String> set,
		List<TExpression> conditions) {
	if (condition.getRightOperand() == null)
		return;
	if (condition.getLeftOperand() == null)
		return;
	if (condition.getExpressionType() == null)
		return;
	if (condition.getExpressionType() == EExpressionType.simple_comparison_t
			&& condition.getComparisonOperator().toString().matches("=+")) {
		conditions.add(condition);
	}
	set.add(condition.getExpressionType().toString());
	checkHelper(condition.getLeftOperand(), set, conditions);
	checkHelper(condition.getRightOperand(), set, conditions);
}
 
开发者ID:KhaledHelmy,项目名称:DB2-Project,代码行数:17,代码来源:ConditionalParsers.java

示例2: convertBooleanExpressionToModel

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private void convertBooleanExpressionToModel( TExpression condition,
		boolean_value_expression booleanValueExpression )
{
	if ( condition.getExpressionType( ) == EExpressionType.logical_or_t )
	{
		boolean_value_expression_or booleanValueExpressionOr = new boolean_value_expression_or( );
		booleanValueExpression.setBoolean_value_expression_or( booleanValueExpressionOr );
		convertOrExpressionToModel( condition, booleanValueExpressionOr );
	}
	else
	{
		boolean_term booleanTerm = new boolean_term( );
		booleanValueExpression.setBoolean_term( booleanTerm );
		convertBooleanExpressionToBooleanTerm( condition, booleanTerm );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:17,代码来源:AnsiGenerator.java

示例3: convertBooleanExpressionToBooleanTerm

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private void convertBooleanExpressionToBooleanTerm( TExpression condition,
		boolean_term booleanTerm )
{
	if ( condition.getExpressionType( ) == EExpressionType.logical_and_t )
	{
		boolean_value_expression_and booleanValueExpressionAnd = new boolean_value_expression_and( );
		booleanTerm.setBoolean_value_expression_and( booleanValueExpressionAnd );
		convertAndExpressionToModel( condition, booleanValueExpressionAnd );
	}
	else
	{
		boolean_factor booleanFactor = new boolean_factor( );
		booleanTerm.setBoolean_factor( booleanFactor );
		convertBooleanExpressionToBooleanFactor( condition, booleanFactor );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:17,代码来源:AnsiGenerator.java

示例4: convertExpressionToInPredicateValue

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private void convertExpressionToInPredicateValue( TExpression expression,
		in_predicate_value in_predicate_value )
{

	if ( expression.getExpressionType( ) == EExpressionType.list_t )
	{
		in_value_list inValueList = new in_value_list( );
		in_predicate_value.setIn_value_list( inValueList );
		List<row_value_expression> rowValueExpressions = inValueList.getRow_value_expression( );
		for ( int i = 0; i < expression.getExprList( ).size( ); i++ )
		{
			TExpression value = expression.getExprList( ).getExpression( i );
			row_value_expression rowValueExpression = new row_value_expression( );
			rowValueExpressions.add( rowValueExpression );
			convertExpressionToRowValueExpression( value,
					rowValueExpression );
		}
	}
	else if ( expression.getExpressionType( ) == EExpressionType.subquery_t )
	{
		table_subquery tableSubquery = new table_subquery( );
		in_predicate_value.setTable_subquery( tableSubquery );
		convertSelectToQueryExpression( expression.getSubQuery( ),
				tableSubquery.getSubquery( ).getQuery_expression( ) );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:27,代码来源:AnsiGenerator.java

示例5: 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

示例6: convertExpressionToCharacterValueExpression

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private void convertExpressionToCharacterValueExpression(
		TExpression expression,
		character_value_expression charValueExpression )
{
	if ( expression.getExpressionType( ) == EExpressionType.concatenate_t )
	{
		concatenation concatenation = new concatenation( );
		charValueExpression.setConcatenation( concatenation );
		convertExpressionToConcatenation( expression, concatenation );
	}
	else
	{
		character_factor characterFactor = new character_factor( );
		charValueExpression.setCharacter_factor( characterFactor );
		convertExpressionToCharacterFactor( expression, characterFactor );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:18,代码来源:AnsiGenerator.java

示例7: convertExpressionToCharacterPrimary

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private void convertExpressionToCharacterPrimary( TExpression expression,
		character_primary character_primary )
{
	if ( expression.getExpressionType( ) == EExpressionType.function_t )
	{
		string_value_function stringValueFunction = new string_value_function( );
		character_primary.setString_value_function( stringValueFunction );
		convertExpressionToStringValueFunction( expression,
				stringValueFunction );
	}
	else
	{
		value_expression_primary valueExpressionPrimary = new value_expression_primary( );
		character_primary.setValue_expression_primary( valueExpressionPrimary );
		convertExpressionToValueExpressionPrimary( expression,
				valueExpressionPrimary );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:19,代码来源:AnsiGenerator.java

示例8: isStringValueExpression

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private boolean isStringValueExpression( TExpression expression )
{
	if ( expression.getExpressionType( ) == EExpressionType.concatenate_t )
	{
		return true;
	}
	else if ( expression.getExpressionType( ) == EExpressionType.simple_constant_t )
	{
		if ( Utility.isString( expression.toString( ) ) )
		{
			return true;
		}
	}
	else if ( expression.getExpressionType( ) == EExpressionType.function_t )
	{
		String functionName = expression.getFunctionCall( )
				.getFunctionName( )
				.toString( );
		if ( Utility.isStringValueFunction( functionName ) )
		{
			return true;
		}
	}
	return false;
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:26,代码来源:AnsiGenerator.java

示例9: 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

示例10: convertExpressionToTerm

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private void convertExpressionToTerm( TExpression expression, term term )
{
	if ( expression.getExpressionType( ) == EExpressionType.arithmetic_divide_t )
	{
		term_solidus_factor termSolidusFactor = new term_solidus_factor( );
		term.setTerm_solidus_factor( termSolidusFactor );
		convertExpressionToTermSolidusFactor( expression, termSolidusFactor );
	}
	else if ( expression.getExpressionType( ) == EExpressionType.arithmetic_times_t )
	{
		term_asterisk_factor termAsteriskFactor = new term_asterisk_factor( );
		term.setTerm_asterisk_factor( termAsteriskFactor );
		convertExpressionToTermAsteriskFactor( expression,
				termAsteriskFactor );
	}
	else
	{
		factor factor = new factor( );
		term.setFactor( factor );
		convertExpressionToFactor( expression, factor );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:23,代码来源:AnsiGenerator.java

示例11: convertBooleanExpressionToBooleanFactor

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private void convertBooleanExpressionToBooleanFactor(
		TExpression condition, boolean_factor booleanFactor )
{
	if ( condition.getExpressionType( ) == EExpressionType.logical_not_t )
	{
		booleanFactor.setKw_not( "not" );
		convertBooleanExpressionToBooleanTest( condition.getRightOperand( ),
				booleanFactor.getBoolean_test( ) );
	}
	else
	{
		convertBooleanExpressionToBooleanTest( condition,
				booleanFactor.getBoolean_test( ) );
	}
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:16,代码来源:AnsiGenerator.java

示例12: 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

示例13: isWindowFunctionExpression

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private boolean isWindowFunctionExpression( TExpression expression )
{
	if ( expression.getExpressionType( ) == EExpressionType.function_t )
	{
		String functionName = expression.getFunctionCall( )
				.getFunctionName( )
				.toString( );
		if ( Utility.isWindowFunction( functionName ) )
		{
			return true;
		}
	}
	return false;
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:15,代码来源:AnsiGenerator.java

示例14: isCastExpression

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private boolean isCastExpression( TExpression expression )
{
	if ( expression.getExpressionType( ) == EExpressionType.function_t )
	{
		String functionName = expression.getFunctionCall( )
				.getFunctionName( )
				.toString( )
				.trim( );
		if ( "CAST".equalsIgnoreCase( functionName ) )
		{
			return true;
		}
	}
	return false;
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:16,代码来源:AnsiGenerator.java

示例15: isCaseAbbreviationExpression

import gudusoft.gsqlparser.EExpressionType; //导入依赖的package包/类
private boolean isCaseAbbreviationExpression( TExpression expression )
{
	if ( expression.getExpressionType( ) == EExpressionType.function_t )
	{
		String functionName = expression.getFunctionCall( )
				.getFunctionName( )
				.toString( );
		if ( Utility.isCaseAbbreviationFunction( functionName ) )
		{
			return true;
		}
	}
	return false;
}
 
开发者ID:sqlparser,项目名称:sql2xml,代码行数:15,代码来源:AnsiGenerator.java


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