Search in sources :

Example 11 with Aggregate

use of org.h2.api.Aggregate in project ignite by apache.

the class GridSqlQueryParser method parseExpression0.

/**
 * @param expression Expression.
 * @param calcTypes Calculate types for all the expressions.
 * @return Parsed expression.
 */
private GridSqlElement parseExpression0(Expression expression, boolean calcTypes) {
    if (expression instanceof ExpressionColumn) {
        ExpressionColumn expCol = (ExpressionColumn) expression;
        return new GridSqlColumn(expCol.getColumn(), parseTableFilter(expCol.getTableFilter()), SCHEMA_NAME.get(expCol), expCol.getOriginalTableAliasName(), expCol.getColumnName());
    }
    if (expression instanceof Alias)
        return new GridSqlAlias(expression.getAlias(), parseExpression(expression.getNonAliasExpression(), calcTypes), true);
    if (expression instanceof ValueExpression)
        // == comparison is legit, see ValueExpression#getSQL()
        return expression == ValueExpression.getDefault() ? GridSqlKeyword.DEFAULT : new GridSqlConst(expression.getValue(null));
    if (expression instanceof Operation) {
        Operation operation = (Operation) expression;
        Integer type = OPERATION_TYPE.get(operation);
        if (type == Operation.NEGATE) {
            assert OPERATION_RIGHT.get(operation) == null;
            return new GridSqlOperation(GridSqlOperationType.NEGATE, parseExpression(OPERATION_LEFT.get(operation), calcTypes));
        }
        return new GridSqlOperation(OPERATION_OP_TYPES[type], parseExpression(OPERATION_LEFT.get(operation), calcTypes), parseExpression(OPERATION_RIGHT.get(operation), calcTypes));
    }
    if (expression instanceof Comparison) {
        Comparison cmp = (Comparison) expression;
        GridSqlOperationType opType = COMPARISON_TYPES[COMPARISON_TYPE.get(cmp)];
        assert opType != null : COMPARISON_TYPE.get(cmp);
        Expression leftExp = COMPARISON_LEFT.get(cmp);
        GridSqlElement left = parseExpression(leftExp, calcTypes);
        if (opType.childrenCount() == 1)
            return new GridSqlOperation(opType, left);
        Expression rightExp = COMPARISON_RIGHT.get(cmp);
        GridSqlElement right = parseExpression(rightExp, calcTypes);
        return new GridSqlOperation(opType, left, right);
    }
    if (expression instanceof ConditionNot)
        return new GridSqlOperation(NOT, parseExpression(expression.getNotIfPossible(null), calcTypes));
    if (expression instanceof ConditionAndOr) {
        ConditionAndOr andOr = (ConditionAndOr) expression;
        int type = ANDOR_TYPE.get(andOr);
        assert type == ConditionAndOr.AND || type == ConditionAndOr.OR;
        return new GridSqlOperation(type == ConditionAndOr.AND ? AND : OR, parseExpression(ANDOR_LEFT.get(andOr), calcTypes), parseExpression(ANDOR_RIGHT.get(andOr), calcTypes));
    }
    if (expression instanceof Subquery) {
        Query qry = ((Subquery) expression).getQuery();
        return parseQueryExpression(qry);
    }
    if (expression instanceof ConditionIn) {
        GridSqlOperation res = new GridSqlOperation(IN);
        res.addChild(parseExpression(LEFT_CI.get((ConditionIn) expression), calcTypes));
        List<Expression> vals = VALUE_LIST_CI.get((ConditionIn) expression);
        for (Expression val : vals) res.addChild(parseExpression(val, calcTypes));
        return res;
    }
    if (expression instanceof ConditionInConstantSet) {
        GridSqlOperation res = new GridSqlOperation(IN);
        res.addChild(parseExpression(LEFT_CICS.get((ConditionInConstantSet) expression), calcTypes));
        List<Expression> vals = VALUE_LIST_CICS.get((ConditionInConstantSet) expression);
        for (Expression val : vals) res.addChild(parseExpression(val, calcTypes));
        return res;
    }
    if (expression instanceof ConditionInSelect) {
        GridSqlOperation res = new GridSqlOperation(IN);
        boolean all = ALL.get((ConditionInSelect) expression);
        int compareType = COMPARE_TYPE.get((ConditionInSelect) expression);
        assert0(!all, expression);
        assert0(compareType == Comparison.EQUAL, expression);
        res.addChild(parseExpression(LEFT_CIS.get((ConditionInSelect) expression), calcTypes));
        Query qry = QUERY_IN.get((ConditionInSelect) expression);
        res.addChild(parseQueryExpression(qry));
        return res;
    }
    if (expression instanceof CompareLike) {
        assert0(ESCAPE.get((CompareLike) expression) == null, expression);
        boolean regexp = REGEXP_CL.get((CompareLike) expression);
        return new GridSqlOperation(regexp ? REGEXP : LIKE, parseExpression(LEFT.get((CompareLike) expression), calcTypes), parseExpression(RIGHT.get((CompareLike) expression), calcTypes));
    }
    if (expression instanceof Function) {
        Function f = (Function) expression;
        GridSqlFunction res = new GridSqlFunction(null, f.getName());
        if (f.getArgs() != null) {
            if (f.getFunctionType() == Function.TABLE || f.getFunctionType() == Function.TABLE_DISTINCT) {
                Column[] cols = FUNC_TBL_COLS.get((TableFunction) f);
                Expression[] args = f.getArgs();
                assert cols.length == args.length;
                for (int i = 0; i < cols.length; i++) {
                    GridSqlElement arg = parseExpression(args[i], calcTypes);
                    GridSqlAlias alias = new GridSqlAlias(cols[i].getName(), arg, false);
                    alias.resultType(fromColumn(cols[i]));
                    res.addChild(alias);
                }
            } else {
                for (Expression arg : f.getArgs()) {
                    if (arg == null) {
                        if (f.getFunctionType() != Function.CASE)
                            throw new IllegalStateException("Function type with null arg: " + f.getFunctionType());
                        res.addChild(GridSqlPlaceholder.EMPTY);
                    } else
                        res.addChild(parseExpression(arg, calcTypes));
                }
            }
        }
        if (f.getFunctionType() == Function.CAST || f.getFunctionType() == Function.CONVERT)
            res.resultType(fromExpression(f));
        return res;
    }
    if (expression instanceof JavaFunction) {
        JavaFunction f = (JavaFunction) expression;
        FunctionAlias alias = FUNC_ALIAS.get(f);
        GridSqlFunction res = new GridSqlFunction(alias.getSchema().getName(), f.getName());
        if (f.getArgs() != null) {
            for (Expression arg : f.getArgs()) res.addChild(parseExpression(arg, calcTypes));
        }
        return res;
    }
    if (expression instanceof Parameter)
        return new GridSqlParameter(((Parameter) expression).getIndex());
    if (expression instanceof Aggregate) {
        int typeId = TYPE.get((Aggregate) expression);
        if (GridSqlAggregateFunction.isValidType(typeId)) {
            GridSqlAggregateFunction res = new GridSqlAggregateFunction(DISTINCT.get((Aggregate) expression), typeId);
            Expression on = ON.get((Aggregate) expression);
            if (on != null)
                res.addChild(parseExpression(on, calcTypes));
            return res;
        }
    }
    if (expression instanceof ExpressionList) {
        Expression[] exprs = EXPR_LIST.get((ExpressionList) expression);
        GridSqlArray res = new GridSqlArray(exprs.length);
        for (Expression expr : exprs) res.addChild(parseExpression(expr, calcTypes));
        return res;
    }
    if (expression instanceof ConditionExists) {
        Query qry = QUERY_EXISTS.get((ConditionExists) expression);
        GridSqlOperation res = new GridSqlOperation(EXISTS);
        res.addChild(parseQueryExpression(qry));
        return res;
    }
    throw new IgniteException("Unsupported expression: " + expression + " [type=" + expression.getClass().getSimpleName() + ']');
}
Also used : ConditionNot(org.h2.expression.ConditionNot) SqlFieldsQuery(org.apache.ignite.cache.query.SqlFieldsQuery) Query(org.h2.command.dml.Query) JavaFunction(org.h2.expression.JavaFunction) Operation(org.h2.expression.Operation) ConditionAndOr(org.h2.expression.ConditionAndOr) Subquery(org.h2.expression.Subquery) ExpressionColumn(org.h2.expression.ExpressionColumn) Function(org.h2.expression.Function) TableFunction(org.h2.expression.TableFunction) JavaFunction(org.h2.expression.JavaFunction) Comparison(org.h2.expression.Comparison) GridSqlType.fromColumn(org.apache.ignite.internal.processors.query.h2.sql.GridSqlType.fromColumn) AlterTableAlterColumn(org.h2.command.ddl.AlterTableAlterColumn) Column(org.h2.table.Column) ExpressionColumn(org.h2.expression.ExpressionColumn) IndexColumn(org.h2.table.IndexColumn) IgniteException(org.apache.ignite.IgniteException) ExpressionList(org.h2.expression.ExpressionList) FunctionAlias(org.h2.engine.FunctionAlias) ConditionIn(org.h2.expression.ConditionIn) AlterTableAddConstraint(org.h2.command.ddl.AlterTableAddConstraint) CompareLike(org.h2.expression.CompareLike) ConditionInConstantSet(org.h2.expression.ConditionInConstantSet) ConditionInSelect(org.h2.expression.ConditionInSelect) Expression(org.h2.expression.Expression) GridSqlType.fromExpression(org.apache.ignite.internal.processors.query.h2.sql.GridSqlType.fromExpression) ValueExpression(org.h2.expression.ValueExpression) FunctionAlias(org.h2.engine.FunctionAlias) Alias(org.h2.expression.Alias) ValueExpression(org.h2.expression.ValueExpression) Parameter(org.h2.expression.Parameter) Aggregate(org.h2.expression.Aggregate) ConditionExists(org.h2.expression.ConditionExists)

Example 12 with Aggregate

use of org.h2.api.Aggregate in project h2database by h2database.

the class UserAggregate method getInstance.

public Aggregate getInstance() {
    if (javaClass == null) {
        javaClass = JdbcUtils.loadUserClass(className);
    }
    Object obj;
    try {
        obj = javaClass.newInstance();
        Aggregate agg;
        if (obj instanceof Aggregate) {
            agg = (Aggregate) obj;
        } else {
            agg = new AggregateWrapper((AggregateFunction) obj);
        }
        return agg;
    } catch (Exception e) {
        throw DbException.convert(e);
    }
}
Also used : AggregateFunction(org.h2.api.AggregateFunction) Aggregate(org.h2.api.Aggregate) SQLException(java.sql.SQLException) DbException(org.h2.message.DbException)

Example 13 with Aggregate

use of org.h2.api.Aggregate in project h2database by h2database.

the class Parser method readFunction.

private Expression readFunction(Schema schema, String name) {
    if (schema != null) {
        return readJavaFunction(schema, name, true);
    }
    boolean allowOverride = database.isAllowBuiltinAliasOverride();
    if (allowOverride) {
        JavaFunction jf = readJavaFunction(null, name, false);
        if (jf != null) {
            return jf;
        }
    }
    AggregateType agg = getAggregateType(name);
    if (agg != null) {
        return readAggregate(agg, name);
    }
    Function function = Function.getFunction(database, name);
    if (function == null) {
        UserAggregate aggregate = database.findAggregate(name);
        if (aggregate != null) {
            return readJavaAggregate(aggregate);
        }
        if (allowOverride) {
            throw DbException.get(ErrorCode.FUNCTION_NOT_FOUND_1, name);
        }
        return readJavaFunction(null, name, true);
    }
    switch(function.getFunctionType()) {
        case Function.CAST:
            {
                function.setParameter(0, readExpression());
                read("AS");
                Column type = parseColumnWithType(null);
                function.setDataType(type);
                read(")");
                break;
            }
        case Function.CONVERT:
            {
                if (database.getMode().swapConvertFunctionParameters) {
                    Column type = parseColumnWithType(null);
                    function.setDataType(type);
                    read(",");
                    function.setParameter(0, readExpression());
                    read(")");
                } else {
                    function.setParameter(0, readExpression());
                    read(",");
                    Column type = parseColumnWithType(null);
                    function.setDataType(type);
                    read(")");
                }
                break;
            }
        case Function.EXTRACT:
            {
                function.setParameter(0, ValueExpression.get(ValueString.get(currentToken)));
                read();
                read("FROM");
                function.setParameter(1, readExpression());
                read(")");
                break;
            }
        case Function.DATE_ADD:
        case Function.DATE_DIFF:
            {
                if (DateTimeFunctions.isDatePart(currentToken)) {
                    function.setParameter(0, ValueExpression.get(ValueString.get(currentToken)));
                    read();
                } else {
                    function.setParameter(0, readExpression());
                }
                read(",");
                function.setParameter(1, readExpression());
                read(",");
                function.setParameter(2, readExpression());
                read(")");
                break;
            }
        case Function.SUBSTRING:
            {
                // Different variants include:
                // SUBSTRING(X,1)
                // SUBSTRING(X,1,1)
                // SUBSTRING(X FROM 1 FOR 1) -- Postgres
                // SUBSTRING(X FROM 1) -- Postgres
                // SUBSTRING(X FOR 1) -- Postgres
                function.setParameter(0, readExpression());
                if (readIf("FROM")) {
                    function.setParameter(1, readExpression());
                    if (readIf("FOR")) {
                        function.setParameter(2, readExpression());
                    }
                } else if (readIf("FOR")) {
                    function.setParameter(1, ValueExpression.get(ValueInt.get(0)));
                    function.setParameter(2, readExpression());
                } else {
                    read(",");
                    function.setParameter(1, readExpression());
                    if (readIf(",")) {
                        function.setParameter(2, readExpression());
                    }
                }
                read(")");
                break;
            }
        case Function.POSITION:
            {
                // can't read expression because IN would be read too early
                function.setParameter(0, readConcat());
                if (!readIf(",")) {
                    read("IN");
                }
                function.setParameter(1, readExpression());
                read(")");
                break;
            }
        case Function.TRIM:
            {
                Expression space = null;
                if (readIf("LEADING")) {
                    function = Function.getFunction(database, "LTRIM");
                    if (!readIf("FROM")) {
                        space = readExpression();
                        read("FROM");
                    }
                } else if (readIf("TRAILING")) {
                    function = Function.getFunction(database, "RTRIM");
                    if (!readIf("FROM")) {
                        space = readExpression();
                        read("FROM");
                    }
                } else if (readIf("BOTH")) {
                    if (!readIf("FROM")) {
                        space = readExpression();
                        read("FROM");
                    }
                }
                Expression p0 = readExpression();
                if (readIf(",")) {
                    space = readExpression();
                } else if (readIf("FROM")) {
                    space = p0;
                    p0 = readExpression();
                }
                function.setParameter(0, p0);
                if (space != null) {
                    function.setParameter(1, space);
                }
                read(")");
                break;
            }
        case Function.TABLE:
        case Function.TABLE_DISTINCT:
            {
                int i = 0;
                ArrayList<Column> columns = New.arrayList();
                do {
                    String columnName = readAliasIdentifier();
                    Column column = parseColumnWithType(columnName);
                    columns.add(column);
                    read("=");
                    function.setParameter(i, readExpression());
                    i++;
                } while (readIfMore(true));
                TableFunction tf = (TableFunction) function;
                tf.setColumns(columns);
                break;
            }
        case Function.ROW_NUMBER:
            read(")");
            read("OVER");
            read("(");
            read(")");
            if (currentSelect == null && currentPrepared == null) {
                throw getSyntaxError();
            }
            return new Rownum(currentSelect == null ? currentPrepared : currentSelect);
        default:
            if (!readIf(")")) {
                int i = 0;
                do {
                    function.setParameter(i++, readExpression());
                } while (readIfMore(true));
            }
    }
    function.doneWithParameters();
    return function;
}
Also used : Function(org.h2.expression.Function) TableFunction(org.h2.expression.TableFunction) JavaFunction(org.h2.expression.JavaFunction) UserAggregate(org.h2.engine.UserAggregate) AlterTableRenameColumn(org.h2.command.ddl.AlterTableRenameColumn) AlterTableAlterColumn(org.h2.command.ddl.AlterTableAlterColumn) Column(org.h2.table.Column) ExpressionColumn(org.h2.expression.ExpressionColumn) IndexColumn(org.h2.table.IndexColumn) Expression(org.h2.expression.Expression) ValueExpression(org.h2.expression.ValueExpression) ArrayList(java.util.ArrayList) JavaFunction(org.h2.expression.JavaFunction) TableFunction(org.h2.expression.TableFunction) ValueString(org.h2.value.ValueString) AggregateType(org.h2.expression.Aggregate.AggregateType) Rownum(org.h2.expression.Rownum) AlterTableRenameConstraint(org.h2.command.ddl.AlterTableRenameConstraint) AlterTableAddConstraint(org.h2.command.ddl.AlterTableAddConstraint) AlterTableDropConstraint(org.h2.command.ddl.AlterTableDropConstraint)

Example 14 with Aggregate

use of org.h2.api.Aggregate in project h2database by h2database.

the class Parser method parseSelectSimpleSelectPart.

private void parseSelectSimpleSelectPart(Select command) {
    Select temp = currentSelect;
    // make sure aggregate functions will not work in TOP and LIMIT
    currentSelect = null;
    if (readIf("TOP")) {
        // can't read more complex expressions here because
        // SELECT TOP 1 +? A FROM TEST could mean
        // SELECT TOP (1+?) A FROM TEST or
        // SELECT TOP 1 (+?) AS A FROM TEST
        Expression limit = readTerm().optimize(session);
        command.setLimit(limit);
    } else if (readIf("LIMIT")) {
        Expression offset = readTerm().optimize(session);
        command.setOffset(offset);
        Expression limit = readTerm().optimize(session);
        command.setLimit(limit);
    }
    currentSelect = temp;
    if (readIf("DISTINCT")) {
        command.setDistinct(true);
    } else {
        readIf("ALL");
    }
    ArrayList<Expression> expressions = New.arrayList();
    do {
        if (readIf("*")) {
            expressions.add(new Wildcard(null, null));
        } else {
            Expression expr = readExpression();
            if (readIf("AS") || currentTokenType == IDENTIFIER) {
                String alias = readAliasIdentifier();
                boolean aliasColumnName = database.getSettings().aliasColumnName;
                aliasColumnName |= database.getMode().aliasColumnName;
                expr = new Alias(expr, alias, aliasColumnName);
            }
            expressions.add(expr);
        }
    } while (readIf(","));
    command.setExpressions(expressions);
}
Also used : Expression(org.h2.expression.Expression) ValueExpression(org.h2.expression.ValueExpression) Wildcard(org.h2.expression.Wildcard) CreateFunctionAlias(org.h2.command.ddl.CreateFunctionAlias) FunctionAlias(org.h2.engine.FunctionAlias) DropFunctionAlias(org.h2.command.ddl.DropFunctionAlias) Alias(org.h2.expression.Alias) ConditionInSelect(org.h2.expression.ConditionInSelect) Select(org.h2.command.dml.Select) ValueString(org.h2.value.ValueString)

Example 15 with Aggregate

use of org.h2.api.Aggregate in project h2database by h2database.

the class Parser method parseDrop.

private Prepared parseDrop() {
    if (readIf("TABLE")) {
        boolean ifExists = readIfExists(false);
        String tableName = readIdentifierWithSchema();
        DropTable command = new DropTable(session, getSchema());
        command.setTableName(tableName);
        while (readIf(",")) {
            tableName = readIdentifierWithSchema();
            DropTable next = new DropTable(session, getSchema());
            next.setTableName(tableName);
            command.addNextDropTable(next);
        }
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        if (readIf("CASCADE")) {
            command.setDropAction(ConstraintActionType.CASCADE);
            readIf("CONSTRAINTS");
        } else if (readIf("RESTRICT")) {
            command.setDropAction(ConstraintActionType.RESTRICT);
        } else if (readIf("IGNORE")) {
            command.setDropAction(ConstraintActionType.SET_DEFAULT);
        }
        return command;
    } else if (readIf("INDEX")) {
        boolean ifExists = readIfExists(false);
        String indexName = readIdentifierWithSchema();
        DropIndex command = new DropIndex(session, getSchema());
        command.setIndexName(indexName);
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        // Support for MySQL: DROP INDEX index_name ON tbl_name
        if (readIf("ON")) {
            readIdentifierWithSchema();
        }
        return command;
    } else if (readIf("USER")) {
        boolean ifExists = readIfExists(false);
        DropUser command = new DropUser(session);
        command.setUserName(readUniqueIdentifier());
        ifExists = readIfExists(ifExists);
        readIf("CASCADE");
        command.setIfExists(ifExists);
        return command;
    } else if (readIf("SEQUENCE")) {
        boolean ifExists = readIfExists(false);
        String sequenceName = readIdentifierWithSchema();
        DropSequence command = new DropSequence(session, getSchema());
        command.setSequenceName(sequenceName);
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        return command;
    } else if (readIf("CONSTANT")) {
        boolean ifExists = readIfExists(false);
        String constantName = readIdentifierWithSchema();
        DropConstant command = new DropConstant(session, getSchema());
        command.setConstantName(constantName);
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        return command;
    } else if (readIf("TRIGGER")) {
        boolean ifExists = readIfExists(false);
        String triggerName = readIdentifierWithSchema();
        DropTrigger command = new DropTrigger(session, getSchema());
        command.setTriggerName(triggerName);
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        return command;
    } else if (readIf("VIEW")) {
        boolean ifExists = readIfExists(false);
        String viewName = readIdentifierWithSchema();
        DropView command = new DropView(session, getSchema());
        command.setViewName(viewName);
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        ConstraintActionType dropAction = parseCascadeOrRestrict();
        if (dropAction != null) {
            command.setDropAction(dropAction);
        }
        return command;
    } else if (readIf("ROLE")) {
        boolean ifExists = readIfExists(false);
        DropRole command = new DropRole(session);
        command.setRoleName(readUniqueIdentifier());
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        return command;
    } else if (readIf("ALIAS")) {
        boolean ifExists = readIfExists(false);
        String aliasName = readIdentifierWithSchema();
        DropFunctionAlias command = new DropFunctionAlias(session, getSchema());
        command.setAliasName(aliasName);
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        return command;
    } else if (readIf("SCHEMA")) {
        boolean ifExists = readIfExists(false);
        DropSchema command = new DropSchema(session);
        command.setSchemaName(readUniqueIdentifier());
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        if (readIf("CASCADE")) {
            command.setDropAction(ConstraintActionType.CASCADE);
        } else if (readIf("RESTRICT")) {
            command.setDropAction(ConstraintActionType.RESTRICT);
        }
        return command;
    } else if (readIf("ALL")) {
        read("OBJECTS");
        DropDatabase command = new DropDatabase(session);
        command.setDropAllObjects(true);
        if (readIf("DELETE")) {
            read("FILES");
            command.setDeleteFiles(true);
        }
        return command;
    } else if (readIf("DOMAIN")) {
        return parseDropUserDataType();
    } else if (readIf("TYPE")) {
        return parseDropUserDataType();
    } else if (readIf("DATATYPE")) {
        return parseDropUserDataType();
    } else if (readIf("AGGREGATE")) {
        return parseDropAggregate();
    } else if (readIf("SYNONYM")) {
        boolean ifExists = readIfExists(false);
        String synonymName = readIdentifierWithSchema();
        DropSynonym command = new DropSynonym(session, getSchema());
        command.setSynonymName(synonymName);
        ifExists = readIfExists(ifExists);
        command.setIfExists(ifExists);
        return command;
    }
    throw getSyntaxError();
}
Also used : DropConstant(org.h2.command.ddl.DropConstant) DropTrigger(org.h2.command.ddl.DropTrigger) DropView(org.h2.command.ddl.DropView) DropUser(org.h2.command.ddl.DropUser) DropSynonym(org.h2.command.ddl.DropSynonym) DropSequence(org.h2.command.ddl.DropSequence) ValueString(org.h2.value.ValueString) DropTable(org.h2.command.ddl.DropTable) DropSchema(org.h2.command.ddl.DropSchema) DropRole(org.h2.command.ddl.DropRole) DropFunctionAlias(org.h2.command.ddl.DropFunctionAlias) DropDatabase(org.h2.command.ddl.DropDatabase) ConstraintActionType(org.h2.constraint.ConstraintActionType) DropIndex(org.h2.command.ddl.DropIndex)

Aggregations

UserAggregate (org.h2.engine.UserAggregate)8 Expression (org.h2.expression.Expression)6 ValueExpression (org.h2.expression.ValueExpression)6 Aggregate (org.h2.api.Aggregate)5 Connection (java.sql.Connection)4 ResultSet (java.sql.ResultSet)4 SQLException (java.sql.SQLException)4 Statement (java.sql.Statement)4 SimpleResultSet (org.h2.tools.SimpleResultSet)4 ValueString (org.h2.value.ValueString)4 CallableStatement (java.sql.CallableStatement)3 PreparedStatement (java.sql.PreparedStatement)3 ConditionInSelect (org.h2.expression.ConditionInSelect)3 Column (org.h2.table.Column)3 IndexColumn (org.h2.table.IndexColumn)3 DatabaseMetaData (java.sql.DatabaseMetaData)2 AlterTableAddConstraint (org.h2.command.ddl.AlterTableAddConstraint)2 AlterTableAlterColumn (org.h2.command.ddl.AlterTableAlterColumn)2 DropFunctionAlias (org.h2.command.ddl.DropFunctionAlias)2 DropSchema (org.h2.command.ddl.DropSchema)2