@Override public String getDropSQL() { return "DROP VIEW IF EXISTS " + getSQL() + " CASCADE"; }
/** * Generate "CREATE" SQL statement for the view. * * @param orReplace if true, then include the OR REPLACE clause * @param force if true, then include the FORCE clause * @return the SQL statement */ public String getCreateSQL(boolean orReplace, boolean force) { return getCreateSQL(orReplace, force, getSQL()); }
@Override public Index getScanIndex(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet<Column> allColumnsSet) { if (createException != null) { String msg = createException.getMessage(); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, createException, getSQL(), msg); } PlanItem item = getBestPlanItem(session, masks, filters, filter, sortOrder, allColumnsSet); return item.getIndex(); }
@Override public String getDropSQL() { return "DROP VIEW IF EXISTS " + getSQL() + " CASCADE"; }
@Override public String getDropSQL() { return "DROP VIEW IF EXISTS " + getSQL() + " CASCADE"; }
public String getDropSQL() { return "DROP VIEW IF EXISTS " + getSQL(); }
/** * Generate "CREATE" SQL statement for the view. * * @param orReplace if true, then include the OR REPLACE clause * @param force if true, then include the FORCE clause * @return the SQL statement */ public String getCreateSQL(boolean orReplace, boolean force) { return getCreateSQL(orReplace, force, getSQL()); }
/** * Generate "CREATE" SQL statement for the view. * * @param orReplace if true, then include the OR REPLACE clause * @param force if true, then include the FORCE clause * @return the SQL statement */ public String getCreateSQL(boolean orReplace, boolean force) { return getCreateSQL(orReplace, force, getSQL()); }
public String getCreateSQL() { StringBuffer buff = new StringBuffer(); buff.append("CREATE FORCE VIEW "); buff.append(getSQL()); if (comment != null) { buff.append(" COMMENT "); buff.append(StringUtils.quoteStringSQL(comment)); } if (columns.length > 0) { buff.append('('); for (int i = 0; i < columns.length; i++) { if (i > 0) { buff.append(", "); } buff.append(columns[i].getSQL()); } buff.append(")"); } buff.append(" AS\n"); buff.append(querySQL); return buff.toString(); }
public Index getScanIndex(Session session) throws SQLException { if (createException != null) { String msg = createException.getMessage(); throw Message.getSQLException(ErrorCode.VIEW_IS_INVALID_2, new String[] { getSQL(), msg }, createException); } PlanItem item = getBestPlanItem(session, null); return item.getIndex(); }
@Override public Index getScanIndex(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet<Column> allColumnsSet) { if (createException != null) { String msg = createException.getMessage(); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, createException, getSQL(), msg); } PlanItem item = getBestPlanItem(session, masks, filters, filter, sortOrder, allColumnsSet); return item.getIndex(); }
@Override public Index getScanIndex(Session session, int[] masks, TableFilter[] filters, int filter, SortOrder sortOrder, HashSet<Column> allColumnsSet) { if (createException != null) { String msg = createException.getMessage(); throw DbException.get(ErrorCode.VIEW_IS_INVALID_2, createException, getSQL(), msg); } PlanItem item = getBestPlanItem(session, masks, filters, filter, sortOrder, allColumnsSet); return item.getIndex(); }