Package org.hsqldb.types

Examples of org.hsqldb.types.Collation


        }

        schemaName = sourceName.schema == null ? null
                                               : sourceName.schema.name;

        Collation source = database.schemaManager.getCollation(session,
            sourceName.name, schemaName);
        Collation  collation = new Collation(name, source, charset, padSpace);
        String     sql            = getLastPart();
        Object[]   args           = new Object[]{ collation };
        HsqlName[] writeLockNames = database.schemaManager.catalogNameArray;

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


        final int pad_attribute     = 3;

        //
        // Intermediate holders
        Iterator  collations;
        Collation collation;
        String    collationName;
        String    collationSchema;
        String    padAttribute = "PAD SPACE";
        Object[]  row;

        collations = database.schemaManager.databaseObjectIterator(
            SchemaObject.COLLATION);

        while (collations.hasNext()) {
            row                    = t.getEmptyRowData();
            collation              = (Collation) collations.next();
            collationSchema        = collation.getSchemaName().name;
            collationName          = collation.getName().name;
            row[collation_catalog] = database.getCatalogName().name;
            row[collation_schema= collationSchema;
            row[collation_name]    = collationName;
            row[pad_attribute]     = collation.isPadSpace() ? "PAD SPACE"
                                                            : "NO PAD";

            t.insertSys(session, store, row);
        }
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

                    scale  = NumberType.defaultNumericScale;
                }
                break;
        }

        Collation collation = database.collation;
        Charset   charset   = null;

        if (isCharacter && allowCollation) {
            if (token.tokenType == Tokens.CHARACTER) {
                read();
View Full Code Here

                break;
            }
            case Tokens.COLLATE : {
                read();

                Collation collation =
                    database.schemaManager.getCollation(session,
                        token.tokenString, token.namePrefix);

                e.setCollation(collation);
                read();
View Full Code Here

    }

    Expression XreadCharacterValueExpression() {

        Expression e         = XreadCharacterPrimary();
        Collation  collation = readCollateClauseOrNull();

        while (token.tokenType == Tokens.CONCAT) {
            read();

            Expression a = e;
View Full Code Here

    Collation readCollateClauseOrNull() {

        if (token.tokenType == Tokens.COLLATE) {
            read();

            Collation collation = database.schemaManager.getCollation(session,
                token.tokenString, token.namePrefix);

            return collation;
        }
View Full Code Here

    }

    public Collation getCollation(Session session, String name,
                                  String schemaName) {

        Collation collation = null;

        if (schemaName == null
                || SqlInvariants.INFORMATION_SCHEMA.equals(schemaName)) {
            try {
                collation = Collation.getCollation(name);
View Full Code Here

            if (!readIfThis(Tokens.CHAR)) {
                readIfThis(Tokens.BYTE);
            }
        }

        Collation collation = database.collation;
        Charset   charset   = null;

        if (isCharacter) {
            if (token.tokenType == Tokens.CHARACTER) {
                read();
View Full Code Here

            }
            case Tokens.COLLATE : {
                read();

                if (token.namePrefix == null) {
                    Collation collation;

                    try {
                        collation = Collation.getCollation(token.tokenString);
                    } catch (HsqlException ex) {
                        collation =
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.