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


Java GreaterThanEquals类代码示例

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


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

示例1: testUpdate

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
public void testUpdate() throws JSQLParserException {
	String statement = "UPDATE mytable set col1='as', col2=?, col3=565 Where o >= 3";
	Update update = (Update) parserManager.parse(new StringReader(statement));
	assertEquals("mytable", update.getTable().getName());
	assertEquals(3, update.getColumns().size());
	assertEquals("col1", ((Column) update.getColumns().get(0)).getColumnName());
	assertEquals("col2", ((Column) update.getColumns().get(1)).getColumnName());
	assertEquals("col3", ((Column) update.getColumns().get(2)).getColumnName());
	assertEquals("as", ((StringValue) update.getExpressions().get(0)).getValue());
	assertTrue(update.getExpressions().get(1) instanceof JdbcParameter);
	assertEquals(565, ((LongValue) update.getExpressions().get(2)).getValue());

	assertTrue(update.getWhere() instanceof GreaterThanEquals);
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:15,代码来源:UpdateTest.java

示例2: testUpdate

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Test
public void testUpdate() throws JSQLParserException {
    String statement = "UPDATE mytable set col1='as', col2=?, col3=565 Where o >= 3";
    Update update = (Update) parserManager.parse(new StringReader(statement));
    assertEquals("mytable", update.getTable().getName());
    assertEquals(3, update.getColumns().size());
    assertEquals("col1", ((Column) update.getColumns().get(0)).getColumnName());
    assertEquals("col2", ((Column) update.getColumns().get(1)).getColumnName());
    assertEquals("col3", ((Column) update.getColumns().get(2)).getColumnName());
    assertEquals("as", ((StringValue) update.getExpressions().get(0)).getValue());
    assertTrue(update.getExpressions().get(1) instanceof JdbcParameter);
    assertEquals(565, ((LongValue) update.getExpressions().get(2)).getValue());

    assertTrue(update.getWhere() instanceof GreaterThanEquals);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:16,代码来源:UpdateTest.java

示例3: visitBinaryExpression

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
protected ISqlExpression visitBinaryExpression(BinaryExpression binaryExpression)
{
   binaryExpression.getLeftExpression().accept(this);
   ISqlExpression leftParameter = getExpression();

   binaryExpression.getRightExpression().accept(this);
   ISqlExpression rightParameter = getExpression();

   if (binaryExpression instanceof EqualsTo) {
      return sSqlFactory.createEqualsToExpression(leftParameter, rightParameter);
   }
   else if (binaryExpression instanceof NotEqualsTo) {
      return sSqlFactory.createNotEqualsToExpression(leftParameter, rightParameter);
   }
   else if (binaryExpression instanceof GreaterThan) {
      return sSqlFactory.createGreaterThanExpression(leftParameter, rightParameter);
   }
   else if (binaryExpression instanceof GreaterThanEquals) {
      return sSqlFactory.createGreaterThanEqualsExpression(leftParameter, rightParameter);
   }
   else if (binaryExpression instanceof MinorThan) {
      return sSqlFactory.createLessThanExpression(leftParameter, rightParameter);
   }
   else if (binaryExpression instanceof MinorThanEquals) {
      return sSqlFactory.createLessThanEqualsExpression(leftParameter, rightParameter);
   }
   throw new UnsupportedSqlExpressionException(binaryExpression.toString());
}
 
开发者ID:obidea,项目名称:semantika,代码行数:29,代码来源:SelectStatementHandler.java

示例4: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Override
public void visit(GreaterThanEquals expr)
{
	invalid = true;
	super.visit(expr);
}
 
开发者ID:olavloite,项目名称:spanner-jdbc,代码行数:7,代码来源:DMLWhereClauseVisitorAdapter.java

示例5: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Override
public void visit(GreaterThanEquals expr) {
    visitBinaryExpression(expr);
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:ExpressionVisitorAdapter.java

示例6: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Override
public void visit(GreaterThanEquals greaterThanEquals) {
    visitOldOracleJoinBinaryExpression(greaterThanEquals, " >= ");

}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:6,代码来源:ExpressionDeParser.java

示例7: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Override
public void visit(GreaterThanEquals greaterThanEquals) {
    visitBinaryExpression(greaterThanEquals);
}
 
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:5,代码来源:TablesNamesFinder.java

示例8: discoverIndexOperations

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
private void discoverIndexOperations(Expression expressionWhere, Table table, String mainTableAlias, SQLRecordPredicate where, TableSpaceManager tableSpaceManager) throws StatementExecutionException {
    SQLRecordKeyFunction keyFunction = findIndexAccess(expressionWhere, table.primaryKey, table, mainTableAlias, EqualsTo.class);
    IndexOperation result = null;
    if (keyFunction != null) {
        if (keyFunction.isFullPrimaryKey()) {
            result = new PrimaryIndexSeek(keyFunction);
        } else {
            result = new PrimaryIndexPrefixScan(keyFunction);
        }
    } else {
        SQLRecordKeyFunction rangeMin = findIndexAccess(expressionWhere, table.primaryKey,
            table, mainTableAlias, GreaterThanEquals.class
        );
        if (rangeMin != null && !rangeMin.isFullPrimaryKey()) {
            rangeMin = null;
        }
        if (rangeMin == null) {
            rangeMin = findIndexAccess(expressionWhere, table.primaryKey, table, mainTableAlias, GreaterThan.class);
            if (rangeMin != null && !rangeMin.isFullPrimaryKey()) {
                rangeMin = null;
            }
        }

        SQLRecordKeyFunction rangeMax = findIndexAccess(expressionWhere, table.primaryKey, table, mainTableAlias, MinorThanEquals.class
        );
        if (rangeMax != null && !rangeMax.isFullPrimaryKey()) {
            rangeMax = null;

        }
        if (rangeMax == null) {
            rangeMax = findIndexAccess(expressionWhere, table.primaryKey, table, mainTableAlias, MinorThan.class
            );
            if (rangeMax != null && !rangeMax.isFullPrimaryKey()) {
                rangeMax = null;
            }
        }
        if (rangeMin != null || rangeMax != null) {
            result = new PrimaryIndexRangeScan(table.primaryKey, rangeMin, rangeMax);
        }
    }

    if (result == null) {
        Map<String, AbstractIndexManager> indexes = tableSpaceManager.getIndexesOnTable(table.name);
        if (indexes != null) {
            // TODO: use some kind of statistics, maybe using an index is more expensive than a full table scan
            for (AbstractIndexManager index : indexes.values()) {
                if (!index.isAvailable()) {
                    continue;
                }
                IndexOperation secondaryIndexOperation = findSecondaryIndexOperation(index, expressionWhere, table);
                if (secondaryIndexOperation != null) {
                    result = secondaryIndexOperation;
                    break;
                }
            }
        }
    }
    where.setIndexOperation(result);
    Expression filterPk = findFiltersOnPrimaryKey(table, table.name, expressionWhere);
    where.setPrimaryKeyFilter(filterPk);
}
 
开发者ID:diennea,项目名称:herddb,代码行数:62,代码来源:SQLPlanner.java

示例9: findSecondaryIndexOperation

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
private static IndexOperation findSecondaryIndexOperation(AbstractIndexManager index, Expression where, Table table) throws StatementExecutionException {
    IndexOperation secondaryIndexOperation = null;
    String[] columnsToMatch = index.getColumnNames();
    SQLRecordKeyFunction indexSeekFunction = findIndexAccess(where, columnsToMatch,
        index.getIndex(),
        table.name,
        EqualsTo.class
    );
    if (indexSeekFunction != null) {
        if (indexSeekFunction.isFullPrimaryKey()) {
            secondaryIndexOperation = new SecondaryIndexSeek(index.getIndexName(), columnsToMatch, indexSeekFunction);
        } else {
            secondaryIndexOperation = new SecondaryIndexPrefixScan(index.getIndexName(), columnsToMatch, indexSeekFunction);
        }
    } else {
        SQLRecordKeyFunction rangeMin = findIndexAccess(where, columnsToMatch,
            index.getIndex(),
            table.name, GreaterThanEquals.class
        );
        if (rangeMin != null && !rangeMin.isFullPrimaryKey()) {
            rangeMin = null;

        }
        if (rangeMin == null) {
            rangeMin = findIndexAccess(where, columnsToMatch,
                index.getIndex(),
                table.name, GreaterThan.class
            );
            if (rangeMin != null && !rangeMin.isFullPrimaryKey()) {
                rangeMin = null;

            }
        }

        SQLRecordKeyFunction rangeMax = findIndexAccess(where, columnsToMatch,
            index.getIndex(),
            table.name, MinorThanEquals.class
        );
        if (rangeMax != null && !rangeMax.isFullPrimaryKey()) {
            rangeMax = null;

        }
        if (rangeMax == null) {
            rangeMax = findIndexAccess(where, columnsToMatch,
                index.getIndex(),
                table.name, MinorThan.class
            );
            if (rangeMax != null && !rangeMax.isFullPrimaryKey()) {
                rangeMax = null;
            }
        }
        if (rangeMin != null || rangeMax != null) {
            secondaryIndexOperation = new SecondaryIndexRangeScan(index.getIndexName(), columnsToMatch, rangeMin, rangeMax);
        }

    }
    return secondaryIndexOperation;
}
 
开发者ID:diennea,项目名称:herddb,代码行数:59,代码来源:SQLPlanner.java

示例10: compileSpecialBinaryExpression

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
private static CompiledSQLExpression compileSpecialBinaryExpression(String validatedTableAlias, Expression exp) {
    BinaryExpression be = (BinaryExpression) exp;

    // MOST frequent expressions "TABLE.COLUMNNAME OPERATOR ?", we can hardcode the access to the column and to the JDBC parameter
    if (be.getLeftExpression() instanceof net.sf.jsqlparser.schema.Column) {
        net.sf.jsqlparser.schema.Column c = (net.sf.jsqlparser.schema.Column) be.getLeftExpression();
        if (validatedTableAlias != null) {
            if (c.getTable() != null && c.getTable().getName() != null
                && !c.getTable().getName().equals(validatedTableAlias)) {
                return null;
            }
        }

        String columnName = c.getColumnName();
        switch (columnName) {
            case BuiltinFunctions.BOOLEAN_TRUE:
                return null;
            case BuiltinFunctions.BOOLEAN_FALSE:
                return null;
            default:
                // OK !
                break;
        }

        if (be.getRightExpression() instanceof JdbcParameter) {
            JdbcParameter jdbcParam = (JdbcParameter) be.getRightExpression();
            int jdbcIndex = jdbcParam.getIndex() - 1;
            if (be instanceof EqualsTo) {
                return new ColumnEqualsJdbcParameter(be.isNot(), columnName, jdbcIndex);
            } else if (be instanceof NotEqualsTo) {
                return new ColumnNotEqualsJdbcParameter(be.isNot(), columnName, jdbcIndex);
            } else if (be instanceof GreaterThanEquals) {
                return new ColumnGreaterThanEqualsJdbcParameter(be.isNot(), columnName, jdbcIndex);
            } else if (be instanceof GreaterThan) {
                return new ColumnGreaterThanJdbcParameter(be.isNot(), columnName, jdbcIndex);
            } else if (be instanceof MinorThan) {
                return new ColumnMinorThanJdbcParameter(be.isNot(), columnName, jdbcIndex);
            } else if (be instanceof MinorThanEquals) {
                return new ColumnMinorThanEqualsJdbcParameter(be.isNot(), columnName, jdbcIndex);
            }
        } // TODO handle "TABLE.COLUMNNAME OPERATOR CONSTANT"
    }
    return null;
}
 
开发者ID:diennea,项目名称:herddb,代码行数:45,代码来源:SQLExpressionCompiler.java

示例11: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Override
public void visit(GreaterThanEquals gte) {
    acceptBinaryExpression(gte);
}
 
开发者ID:diennea,项目名称:herddb,代码行数:5,代码来源:ColumnReferencesDiscovery.java

示例12: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Override
public void visit(GreaterThanEquals arg0) {
   log.debug("sql expression = " + arg0.toString());
   value = arg0.getStringExpression();
}
 
开发者ID:Wolfgang-Winter,项目名称:cibet,代码行数:6,代码来源:SqlExpressionParser.java

示例13: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
public void visit(GreaterThanEquals greaterThanEquals) {
	visitBinaryExpression(greaterThanEquals);
}
 
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:4,代码来源:TablesNamesFinder.java

示例14: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
@Override
public void visit(GreaterThanEquals arg0) {
	isSimple = false;
}
 
开发者ID:coastland,项目名称:gsp-dba-maven-plugin,代码行数:5,代码来源:ViewAnalyzer.java

示例15: visit

import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; //导入依赖的package包/类
public void visit(GreaterThanEquals greaterThanEquals) {
    visitBinaryExpression(greaterThanEquals);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:4,代码来源:TablesNamesFinder.java


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