org.h2.command.dml.Query.addGlobalCondition()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(349)

本文整理了Java中org.h2.command.dml.Query.addGlobalCondition方法的一些代码示例,展示了Query.addGlobalCondition的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.addGlobalCondition方法的具体详情如下:
包路径:org.h2.command.dml.Query
类名称:Query
方法名:addGlobalCondition

Query.addGlobalCondition介绍

[英]Add a condition to the query. This is used for views.
[中]向查询中添加一个条件。这用于视图。

代码示例

代码示例来源:origin: com.h2database/h2

  1. @Override
  2. public void addGlobalCondition(Parameter param, int columnId,
  3. int comparisonType) {
  4. addParameter(param);
  5. switch (unionType) {
  6. case UNION_ALL:
  7. case UNION:
  8. case INTERSECT: {
  9. left.addGlobalCondition(param, columnId, comparisonType);
  10. right.addGlobalCondition(param, columnId, comparisonType);
  11. break;
  12. }
  13. case EXCEPT: {
  14. left.addGlobalCondition(param, columnId, comparisonType);
  15. break;
  16. }
  17. default:
  18. DbException.throwInternalError("type=" + unionType);
  19. }
  20. }

代码示例来源:origin: com.h2database/h2

  1. if ((mask & IndexCondition.EQUALITY) != 0) {
  2. Parameter param = new Parameter(firstIndexParam + i);
  3. q.addGlobalCondition(param, idx, Comparison.EQUAL_NULL_SAFE);
  4. i++;
  5. q.addGlobalCondition(param, idx, Comparison.BIGGER_EQUAL);
  6. i++;
  7. q.addGlobalCondition(param, idx, Comparison.SMALLER_EQUAL);
  8. i++;
  9. q.addGlobalCondition(param, idx, Comparison.SPATIAL_INTERSECTS);
  10. i++;

代码示例来源:origin: com.h2database/com.springsource.org.h2

  1. public void addGlobalCondition(Parameter param, int columnId, int comparisonType) throws SQLException {
  2. addParameter(param);
  3. switch (unionType) {
  4. case UNION_ALL:
  5. case UNION:
  6. case INTERSECT: {
  7. left.addGlobalCondition(param, columnId, comparisonType);
  8. right.addGlobalCondition(param, columnId, comparisonType);
  9. break;
  10. }
  11. case EXCEPT: {
  12. left.addGlobalCondition(param, columnId, comparisonType);
  13. break;
  14. }
  15. default:
  16. throw Message.getInternalError("type=" + unionType);
  17. }
  18. }

代码示例来源:origin: com.eventsourcing/h2

  1. @Override
  2. public void addGlobalCondition(Parameter param, int columnId,
  3. int comparisonType) {
  4. addParameter(param);
  5. switch (unionType) {
  6. case UNION_ALL:
  7. case UNION:
  8. case INTERSECT: {
  9. left.addGlobalCondition(param, columnId, comparisonType);
  10. right.addGlobalCondition(param, columnId, comparisonType);
  11. break;
  12. }
  13. case EXCEPT: {
  14. left.addGlobalCondition(param, columnId, comparisonType);
  15. break;
  16. }
  17. default:
  18. DbException.throwInternalError("type=" + unionType);
  19. }
  20. }

代码示例来源:origin: org.wowtools/h2

  1. @Override
  2. public void addGlobalCondition(Parameter param, int columnId,
  3. int comparisonType) {
  4. addParameter(param);
  5. switch (unionType) {
  6. case UNION_ALL:
  7. case UNION:
  8. case INTERSECT: {
  9. left.addGlobalCondition(param, columnId, comparisonType);
  10. right.addGlobalCondition(param, columnId, comparisonType);
  11. break;
  12. }
  13. case EXCEPT: {
  14. left.addGlobalCondition(param, columnId, comparisonType);
  15. break;
  16. }
  17. default:
  18. DbException.throwInternalError("type=" + unionType);
  19. }
  20. }

代码示例来源:origin: org.wowtools/h2

  1. if ((mask & IndexCondition.EQUALITY) != 0) {
  2. Parameter param = new Parameter(firstIndexParam + i);
  3. q.addGlobalCondition(param, idx, Comparison.EQUAL_NULL_SAFE);
  4. i++;
  5. q.addGlobalCondition(param, idx, Comparison.BIGGER_EQUAL);
  6. i++;
  7. q.addGlobalCondition(param, idx, Comparison.SMALLER_EQUAL);
  8. i++;
  9. q.addGlobalCondition(param, idx, Comparison.SPATIAL_INTERSECTS);
  10. i++;

代码示例来源:origin: com.eventsourcing/h2

  1. if ((mask & IndexCondition.EQUALITY) != 0) {
  2. Parameter param = new Parameter(firstIndexParam + i);
  3. q.addGlobalCondition(param, idx, Comparison.EQUAL_NULL_SAFE);
  4. i++;
  5. q.addGlobalCondition(param, idx, Comparison.BIGGER_EQUAL);
  6. i++;
  7. q.addGlobalCondition(param, idx, Comparison.SMALLER_EQUAL);
  8. i++;
  9. q.addGlobalCondition(param, idx, Comparison.SPATIAL_INTERSECTS);
  10. i++;

代码示例来源:origin: com.h2database/com.springsource.org.h2

  1. if ((mask & IndexCondition.EQUALITY) == IndexCondition.EQUALITY) {
  2. Parameter param = new Parameter(firstIndexParam + i);
  3. query.addGlobalCondition(param, idx, Comparison.EQUAL);
  4. i++;
  5. } else {
  6. if ((mask & IndexCondition.START) == IndexCondition.START) {
  7. Parameter param = new Parameter(firstIndexParam + i);
  8. query.addGlobalCondition(param, idx, Comparison.BIGGER_EQUAL);
  9. i++;
  10. query.addGlobalCondition(param, idx, Comparison.SMALLER_EQUAL);
  11. i++;

代码示例来源:origin: com.h2database/com.springsource.org.h2

  1. if ((mask & IndexCondition.EQUALITY) != 0) {
  2. Parameter param = new Parameter(nextParamIndex);
  3. query.addGlobalCondition(param, idx, Comparison.EQUAL);
  4. } else {
  5. if ((mask & IndexCondition.START) != 0) {
  6. Parameter param = new Parameter(nextParamIndex);
  7. query.addGlobalCondition(param, idx, Comparison.BIGGER_EQUAL);
  8. query.addGlobalCondition(param, idx, Comparison.SMALLER_EQUAL);

相关文章