Package org.hsqldb.types

Examples of org.hsqldb.types.Type$TypedComparator


            readThis(Tokens.COMMA);
        } else {
            readThis(Tokens.AS);
        }

        Type typeObject = readTypeDefinition(true);

        if (l.isUnresolvedParam()) {
            l.setDataType(session, typeObject);
        } else {
            l = new ExpressionOp(l, typeObject);
View Full Code Here


        if (typeCode < 0) {
            throw Util.invalidArgument(typeName);
        }

        Type type = Type.getDefaultType(typeCode);

        Object[] newData = new Object[elements.length];
        for (int i = 0; i < elements.length; i++) {
            newData[i] = type.convertJavaToSQL(sessionProxy, elements[i]);
        }
        return new JDBCArray(newData, type, this);
    }
View Full Code Here

        }

        // conversion of right argument to character for backward compatibility
        if (nodes[LEFT].dataType.isCharacterType()
                && !nodes[RIGHT].dataType.isCharacterType()) {
            Type newType = CharacterType.getCharacterType(Types.SQL_VARCHAR,
                nodes[RIGHT].dataType.displaySize());

            nodes[RIGHT] = ExpressionOp.getCastExpression(session,
                    nodes[RIGHT], newType);
        }

        if (nodes[RIGHT].dataType.isCharacterType()
                && !nodes[LEFT].dataType.isCharacterType()) {
            Type newType = CharacterType.getCharacterType(Types.SQL_VARCHAR,
                nodes[LEFT].dataType.displaySize());

            nodes[LEFT] = ExpressionOp.getCastExpression(session, nodes[LEFT],
                    newType);
        }
View Full Code Here

                    currentJoinData[i] = null;

                    continue;
                }

                Type valueType =
                    conditions[condIndex].indexCond[i].getRightNode()
                        .getDataType();
                Object value =
                    conditions[condIndex].indexCond[i].getRightNode().getValue(
                        session);
                Type targetType =
                    conditions[condIndex].indexCond[i].getLeftNode()
                        .getDataType();

                if (targetType != valueType) {
                    range = targetType.compareToTypeRange(value);

                    if (range == 0) {
                        if (targetType.typeComparisonGroup
                                != valueType.typeComparisonGroup) {
                            value = targetType.convertToType(session, value,
                                                             valueType);
                        }
                    }
                }
View Full Code Here

        name = readNewSchemaObjectName(SchemaObject.DOMAIN, false);

        readIfThis(Tokens.AS);

        Type       type          = readTypeDefinition(false).duplicate();
        Expression defaultClause = null;

        if (readIfThis(Tokens.DEFAULT)) {
            defaultClause = readDefaultClause(type);
        }
View Full Code Here

        HsqlName name = readNewSchemaObjectName(SchemaObject.TYPE, false);

        readThis(Tokens.AS);

        Type type = readTypeDefinition(false).duplicate();

        readIfThis(Tokens.FINAL);

        UserTypeModifier userTypeModifier = new UserTypeModifier(name,
            SchemaObject.TYPE, type);
View Full Code Here

        boolean        isPKIdentity    = false;
        boolean        generatedAlways = false;
        Expression     generateExpr    = null;
        boolean        isNullable      = true;
        Expression     defaultExpr     = null;
        Type           typeObject      = null;
        NumberSequence sequence        = null;

        if (token.tokenType == Tokens.GENERATED) {
            read();
            readThis(Tokens.ALWAYS);
View Full Code Here

                case Tokens.AS : {
                    if (withType) {
                        read();

                        Type type = readTypeDefinition(true);

                        sequence.setDefaults(sequence.getName(), type);

                        break;
                    }
View Full Code Here

                    case Tokens.DEFAULT : {
                        read();

                        //ALTER TABLE .. ALTER COLUMN .. SET DEFAULT
                        TableWorks tw   = new TableWorks(session, table);
                        Type       type = column.getDataType();
                        Expression expr = this.readDefaultClause(type);

                        tw.setColDefaultExpression(columnIndex, expr);

                        return;
View Full Code Here

                    }
                    case Tokens.DEFAULT : {
                        read();

                        //ALTER TABLE .. ALTER COLUMN .. SET DEFAULT
                        Type       type = column.getDataType();
                        Expression expr = this.readDefaultClause(type);

                        return compileAlterColumnSetDefault(table, column,
                                                            expr);
                    }
View Full Code Here

TOP

Related Classes of org.hsqldb.types.Type$TypedComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.