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

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

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

Query.getPlanSQL介绍

暂无

代码示例

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

  1. @Override
  2. public String getPlanSQL() {
  3. return query == null ? null : query.getPlanSQL();
  4. }

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

  1. @Override
  2. public String getSQL() {
  3. return "(" + query.getPlanSQL() + ")";
  4. }

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

  1. @Override
  2. public String getSQL() {
  3. return "EXISTS(\n" + StringUtils.indent(query.getPlanSQL(), 4, false) + ")";
  4. }

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

  1. @Override
  2. public String getSQL() {
  3. StringBuilder buff = new StringBuilder();
  4. buff.append('(').append(left.getSQL()).append(' ');
  5. if (all) {
  6. buff.append(Comparison.getCompareOperator(compareType)).
  7. append(" ALL");
  8. } else {
  9. if (compareType == Comparison.EQUAL) {
  10. buff.append("IN");
  11. } else {
  12. buff.append(Comparison.getCompareOperator(compareType)).
  13. append(" ANY");
  14. }
  15. }
  16. buff.append("(\n").append(StringUtils.indent(query.getPlanSQL(), 4, false)).
  17. append("))");
  18. return buff.toString();
  19. }

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

  1. @Override
  2. public String getPlanSQL() {
  3. StringBuilder buff = new StringBuilder();
  4. buff.append('(').append(left.getPlanSQL()).append(')');
  5. switch (unionType) {
  6. case UNION_ALL:
  7. DbException.throwInternalError("type=" + unionType);
  8. buff.append('(').append(right.getPlanSQL()).append(')');
  9. Expression[] exprList = expressions.toArray(new Expression[0]);
  10. if (sort != null) {

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

  1. querySQLOutput[0] = StringUtils.cache(theQuery.getPlanSQL());
  2. ColumnNamer columnNamer = new ColumnNamer(theQuery.getSession());
  3. ArrayList<Expression> withExpressions = theQuery.getExpressions();

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

  1. /**
  2. * Create a temporary view out of the given query.
  3. *
  4. * @param session the session
  5. * @param owner the owner of the query
  6. * @param name the view name
  7. * @param query the query
  8. * @param topQuery the top level query
  9. * @return the view table
  10. */
  11. public static TableView createTempView(Session session, User owner,
  12. String name, Query query, Query topQuery) {
  13. Schema mainSchema = session.getDatabase().getSchema(Constants.SCHEMA_MAIN);
  14. String querySQL = query.getPlanSQL();
  15. TableView v = new TableView(mainSchema, 0, name,
  16. querySQL, query.getParameters(), null /* column templates */, session,
  17. false/* allow recursive */, true /* literals have already been checked when parsing original query */,
  18. false /* is table expression */, false/* is persistent*/);
  19. if (v.createException != null) {
  20. throw v.createException;
  21. }
  22. v.setTopQuery(topQuery);
  23. v.setOwner(owner);
  24. v.setTemporary(true);
  25. return v;
  26. }

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

  1. String sql = q.getPlanSQL();
  2. q = prepareSubQuery(sql, session, masks, filters, filter, sortOrder);
  3. return q;

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

  1. buff.append(query.getPlanSQL());

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

  1. buff.append(query.getPlanSQL());

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

  1. try {
  2. Query compiledQuery = compileViewQuery(session, querySQL, literalsChecked, getName());
  3. this.querySQL = compiledQuery.getPlanSQL();
  4. tables = new ArrayList<>(compiledQuery.getTables());
  5. ArrayList<Expression> expressions = compiledQuery.getExpressions();

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

  1. throw DbException.getUnsupportedException("parameters in views");
  2. querySQL = select.getPlanSQL();

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

  1. buff.append(query.getPlanSQL());

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

  1. buff.append(query.getPlanSQL());

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

  1. case Comparison.IN_QUERY:
  2. buff.append(" IN(");
  3. buff.append(expressionQuery.getPlanSQL());
  4. buff.append(')');
  5. break;

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

  1. @Override
  2. public String getPlanSQL() {
  3. return query == null ? null : query.getPlanSQL();
  4. }

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

  1. public String getSQL() {
  2. StringBuffer buff = new StringBuffer();
  3. buff.append("EXISTS(");
  4. buff.append(query.getPlanSQL());
  5. buff.append(")");
  6. return buff.toString();
  7. }

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

  1. public String getSQL() {
  2. StringBuffer buff = new StringBuffer("(");
  3. buff.append(left.getSQL());
  4. buff.append(" IN(");
  5. buff.append(query.getPlanSQL());
  6. buff.append("))");
  7. return buff.toString();
  8. }

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

  1. public ViewIndex(TableView view, ViewIndex index, Session session, int[] masks) throws SQLException {
  2. initBaseIndex(view, 0, null, null, IndexType.createNonUnique(false));
  3. this.querySQL = index.querySQL;
  4. this.originalParameters = index.originalParameters;
  5. this.recursive = index.recursive;
  6. this.masks = masks;
  7. this.session = session;
  8. columns = new Column[0];
  9. query = getQuery(session, masks);
  10. planSQL = query.getPlanSQL();
  11. }

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

  1. public static TableView createTempView(Session s, User owner, Query query) throws SQLException {
  2. String tempViewName = s.getNextTempViewName();
  3. Schema mainSchema = s.getDatabase().getSchema(Constants.SCHEMA_MAIN);
  4. String querySQL = query.getPlanSQL();
  5. TableView v = new TableView(mainSchema, 0, tempViewName, querySQL, query.getParameters(), null, s,
  6. false);
  7. if (v.createException != null) {
  8. throw v.createException;
  9. }
  10. v.setOwner(owner);
  11. v.setTemporary(true);
  12. return v;
  13. }

相关文章