Examples of addCheckConstraint()


Examples of org.h2.table.Column.addCheckConstraint()

            if (selectivity != Constants.SELECTIVITY_DEFAULT) {
                column.setSelectivity(selectivity);
            }
            Expression checkConstraint = templateColumn.getCheckConstraint(session, columnName);
            if (checkConstraint != null) {
                column.addCheckConstraint(session, checkConstraint);
            }
        }
        column.setComment(comment);
        column.setOriginalSQL(original);
        return column;
View Full Code Here

Examples of org.h2.table.Column.addCheckConstraint()

        command.setTypeName(readUniqueIdentifier());
        read("AS");
        Column col = parseColumnForTable("VALUE", true);
        if (readIf("CHECK")) {
            Expression expr = readExpression();
            col.addCheckConstraint(session, expr);
        }
        col.rename(null);
        command.setColumn(col);
        command.setIfNotExists(ifNotExists);
        return command;
View Full Code Here

Examples of org.h2.table.Column.addCheckConstraint()

                        } else {
                            readIf("NULL");
                        }
                        if (readIf("CHECK")) {
                            Expression expr = readExpression();
                            column.addCheckConstraint(session, expr);
                        }
                        if (readIf("REFERENCES")) {
                            AlterTableAddConstraint ref = new AlterTableAddConstraint(session, schema, false);
                            ref.setConstraintName(constraintName);
                            ref.setType(CommandInterface.ALTER_TABLE_ADD_CONSTRAINT_REFERENTIAL);
View Full Code Here

Examples of org.h2.table.Column.addCheckConstraint()

            if (selectivity != Constants.SELECTIVITY_DEFAULT) {
                column.setSelectivity(selectivity);
            }
            Expression checkConstraint = templateColumn.getCheckConstraint(session, columnName);
            if (checkConstraint != null) {
                column.addCheckConstraint(session, checkConstraint);
            }
        }
        column.setComment(comment);
        column.setOriginalSQL(original);
        return column;
View Full Code Here

Examples of org.h2.table.Column.addCheckConstraint()

        command.setTypeName(readUniqueIdentifier());
        read("AS");
        Column col = parseColumnForTable("VALUE", true);
        if (readIf("CHECK")) {
            Expression expr = readExpression();
            col.addCheckConstraint(session, expr);
        }
        col.rename(null);
        command.setColumn(col);
        command.setIfNotExists(ifNotExists);
        return command;
View Full Code Here

Examples of org.h2.table.Column.addCheckConstraint()

                        } else {
                            readIf("NULL");
                        }
                        if (readIf("CHECK")) {
                            Expression expr = readExpression();
                            column.addCheckConstraint(session, expr);
                        }
                        if (readIf("REFERENCES")) {
                            AlterTableAddConstraint ref = new AlterTableAddConstraint(session, schema, false);
                            ref.setConstraintName(constraintName);
                            ref.setType(CommandInterface.ALTER_TABLE_ADD_CONSTRAINT_REFERENTIAL);
View Full Code Here

Examples of org.hibernate.mapping.Table.addCheckConstraint()

    Attribute whereNode = node.attribute( "where" );
    if ( whereNode != null ) entity.setWhere( whereNode.getValue() );

    // CHECK
    Attribute chNode = node.attribute( "check" );
    if ( chNode != null ) table.addCheckConstraint( chNode.getValue() );

    // POLYMORPHISM
    Attribute polyNode = node.attribute( "polymorphism" );
    entity.setExplicitPolymorphism( ( polyNode != null )
      && polyNode.getValue().equals( "explicit" ) );
View Full Code Here

Examples of org.hibernate.mapping.Table.addCheckConstraint()

    joinedSubclass.createPrimaryKey();
    joinedSubclass.createForeignKey();

    // CHECK
    Attribute chNode = node.attribute( "check" );
    if ( chNode != null ) mytable.addCheckConstraint( chNode.getValue() );

    // properties
    createClassProperties( node, joinedSubclass, mappings, inheritedMetas );

  }
View Full Code Here

Examples of org.hibernate.mapping.Table.addCheckConstraint()

    Attribute whereNode = node.attribute( "where" );
    if ( whereNode != null ) entity.setWhere( whereNode.getValue() );

    // CHECK
    Attribute chNode = node.attribute( "check" );
    if ( chNode != null ) table.addCheckConstraint( chNode.getValue() );

    // POLYMORPHISM
    Attribute polyNode = node.attribute( "polymorphism" );
    entity.setExplicitPolymorphism( ( polyNode != null )
      && polyNode.getValue().equals( "explicit" ) );
View Full Code Here

Examples of org.hibernate.mapping.Table.addCheckConstraint()

    joinedSubclass.createPrimaryKey();
    joinedSubclass.createForeignKey();

    // CHECK
    Attribute chNode = node.attribute( "check" );
    if ( chNode != null ) mytable.addCheckConstraint( chNode.getValue() );

    // properties
    createClassProperties( node, joinedSubclass, mappings, inheritedMetas );

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.