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


Java EExpressionType.function_t方法代码示例

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


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

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

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

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

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

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

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

示例7: UpdateStmt

import gudusoft.gsqlparser.EExpressionType; //导入方法依赖的package包/类
public UpdateStmt(TUpdateSqlStatement stmt) throws NoSqlTypeException {
    super(stmt);
    this.Op = "UPDATE";
    // if the target is an alia, it means itself is an source, add it into source in checkAlias function
    this.targetTables.add(checkAlias(stmt.tables, stmt.getTargetTable()
            .getName()));

    // the first one is target, begin from second one
    for (int i = 1; i < stmt.tables.size(); i++) {
        if (stmt.tables.getTable(i).isBaseTable()) {
            this.sourceTables.add(stmt.tables.getTable(i).toString());
            //System.out.println(i+stmt.tables.getTable(i).toString());
        } else {
            this.nestedSource
                    .add(SqlParser.analyzeStmt(stmt.tables.getTable(i).subquery));
            //System.out.println(i+stmt.tables.getTable(i).toString());
        }
    }
    if (stmt.getWhereClause() != null) {
        whereClause = stmt.getWhereClause().toString();
        // if there is a select in "in" clause, this should also be a source
        // this expression can be exreamly complex, can't fit for all
        processWhere(stmt);

    }

    // check the source inside the set clause
    TResultColumn a = stmt.getResultColumnList().getResultColumn(0);
    TExpression expression = a.getExpr();
    TExpression value = expression.getRightOperand();

    value.getExpressionType();

    if( value.getExpressionType() == EExpressionType.function_t ){
        TExpressionList argList = value.getFunctionCall().getArgs();
        for(int i=0; i< argList.size(); i++){
            TExpression arg = argList.getExpression(i);
            if (arg.getExpressionType() == EExpressionType.subquery_t){
                Stmt subqury = SqlParser.analyzeStmt(arg.getSubQuery());
                this.nestedSource.add(subqury);
            }
        }
    }
}
 
开发者ID:linkedin,项目名称:WhereHows,代码行数:45,代码来源:UpdateStmt.java


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