Package org.hsqldb.types

Examples of org.hsqldb.types.Collation


        if (charset == null) {
            throw Error.error(ErrorCode.X_42501,
                              charsetName.getSchemaQualifiedStatementName());
        }

        Collation source;

        try {
            source = Collation.getCollation(sourceName.name);
        } catch (HsqlException e) {
            source =
                (Collation) database.schemaManager.getSchemaObject(sourceName);
        }

        if (source == null) {
            throw Error.error(ErrorCode.X_42501,
                              sourceName.getSchemaQualifiedStatementName());
        }

        Collation  collation       = new Collation(name, source, charset);
        String     sql             = getLastPart();
        Object[]   args            = new Object[]{ collation };
        HsqlName[] writeTableNames = database.schemaManager.catalogNameArray;

        return new StatementSchema(sql, StatementTypes.CREATE_COLLATION, args,
View Full Code Here


            sb.append(colname);
            sb.append(' ');
            sb.append(type.getTypeDefinition());

            if (type.isCharacterType()) {
                Collation collation = ((CharacterType) type).getCollation();

                if (collation.isObjectCollation()) {
                    sb.append(' ').append(Tokens.T_COLLATE).append(' ');
                    sb.append(collation.getName().statementName);
                }
            }

            String defaultString = column.getDefaultSQL();
View Full Code Here

                } catch (HsqlException e) {
                    return Result.newErrorResult(e, sql);
                }
            }
            case StatementTypes.CREATE_COLLATION : {
                Collation collation = (Collation) arguments[0];

                try {
                    setOrCheckObjectName(session, null, collation.getName(),
                                         true);
                    schemaManager.addSchemaObject(collation);

                    break;
                } catch (HsqlException e) {
View Full Code Here

            sb.append(' ');
            sb.append(type.getTypeDefinition());

            if (!type.isDistinctType() && !type.isDomainType()) {
                if (type.isCharacterType()) {
                    Collation collation =
                        ((CharacterType) type).getCollation();

                    if (collation.isObjectCollation()) {
                        sb.append(' ').append(collation.getCollateSQL());
                    }
                }
            }

            String defaultString = column.getDefaultSQL();
View Full Code Here

TOP

Related Classes of org.hsqldb.types.Collation

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.