Examples of PgTable


Examples of cz.startnet.utils.pgdiff.schema.PgTable

        final String objectName = ParserUtils.getObjectName(columnName);
        final String tableName = ParserUtils.getSecondObjectName(columnName);
        final String schemaName = ParserUtils.getThirdObjectName(columnName);
        final PgSchema schema = database.getSchema(schemaName);

        final PgTable table = schema.getTable(tableName);

        if (table == null) {
            final PgView view = schema.getView(tableName);
            parser.expect("IS");

            final String comment = getComment(parser);

            if (comment == null) {
                view.removeColumnComment(objectName);
            } else {
                view.addColumnComment(objectName, comment);
            }
            parser.expect(";");
        } else {
            final PgColumn column = table.getColumn(objectName);

            if (column == null) {
                throw new ParserException(MessageFormat.format(
                        Resources.getString("CannotFindColumnInTable"),
                        columnName, table.getName()));
            }

            parser.expect("IS");
            column.setComment(getComment(parser));
            parser.expect(";");
View Full Code Here

Examples of cz.startnet.utils.pgdiff.schema.PgTable

     */
    public static void createConstraints(final PrintWriter writer,
            final PgSchema oldSchema, final PgSchema newSchema,
            final boolean primaryKey, final SearchPathHelper searchPathHelper) {
        for (final PgTable newTable : newSchema.getTables()) {
            final PgTable oldTable;

            if (oldSchema == null) {
                oldTable = null;
            } else {
                oldTable = oldSchema.getTable(newTable.getName());
View Full Code Here

Examples of cz.startnet.utils.pgdiff.schema.PgTable

     */
    public static void dropConstraints(final PrintWriter writer,
            final PgSchema oldSchema, final PgSchema newSchema,
            final boolean primaryKey, final SearchPathHelper searchPathHelper) {
        for (final PgTable newTable : newSchema.getTables()) {
            final PgTable oldTable;

            if (oldSchema == null) {
                oldTable = null;
            } else {
                oldTable = oldSchema.getTable(newTable.getName());
View Full Code Here

Examples of cz.startnet.utils.pgdiff.schema.PgTable

        if (oldSchema == null) {
            return;
        }

        for (PgTable oldTable : oldSchema.getTables()) {
            final PgTable newTable = newSchema.getTable(oldTable.getName());

            if (newTable == null) {
                continue;
            }

            for (final PgConstraint oldConstraint : oldTable.getConstraints()) {
                final PgConstraint newConstraint =
                        newTable.getConstraint(oldConstraint.getName());

                if (newConstraint == null) {
                    continue;
                }
View Full Code Here

Examples of cz.startnet.utils.pgdiff.schema.PgTable

    public static void dropIndexes(final PrintWriter writer,
            final PgSchema oldSchema, final PgSchema newSchema,
            final SearchPathHelper searchPathHelper) {
        for (final PgTable newTable : newSchema.getTables()) {
            final String newTableName = newTable.getName();
            final PgTable oldTable;

            if (oldSchema == null) {
                oldTable = null;
            } else {
                oldTable = oldSchema.getTable(newTableName);
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.