Examples of quoteFullyQualifiedName()


Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

                QuotingStrategy context = adapter.getQuotingStrategy(getEntity()
                        .getDataMap()
                        .isQuotingSQLIdentifiers());

                sqlBuffer.append("ALTER TABLE ");
                sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
                sqlBuffer.append(" CHANGE ");
                sqlBuffer.append(context.quoteString(getColumn().getName()));
                sqlBuffer.append(" ");
                adapter.createTableAppendColumn(sqlBuffer, column);
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

                QuotingStrategy context = adapter.getQuotingStrategy(getEntity()
                        .getDataMap()
                        .isQuotingSQLIdentifiers());

                sqlBuffer.append("ALTER TABLE ");
                sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
                sqlBuffer.append(" CHANGE ");
                sqlBuffer.append(context.quoteString(getColumn().getName()));
                sqlBuffer.append(" ");
                adapter.createTableAppendColumn(sqlBuffer, column);
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

                        .getDataMap()
                        .isQuotingSQLIdentifiers());
                StringBuilder buf = new StringBuilder();
                // http://dev.mysql.com/tech-resources/articles/mysql-cluster-50.html
                buf.append("ALTER TABLE ");
                buf.append(context.quoteFullyQualifiedName(entity));
                buf.append(" DROP FOREIGN KEY ");
                buf.append(fkName);

                return Collections.singletonList(buf.toString());
            }
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

        }
        QuotingStrategy context = getQuotingStrategy(status);

        StringBuilder buf = new StringBuilder();
        buf.append("CREATE TABLE ");
        buf.append(context.quoteFullyQualifiedName(ent));

        buf.append(" (");

        // columns
        Iterator<DbAttribute> it = ent.getAttributes().iterator();
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

                QuotingStrategy context = adapter.getQuotingStrategy(getEntity()
                        .getDataMap()
                        .isQuotingSQLIdentifiers());

                sqlBuffer.append("ALTER TABLE ");
                sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
                sqlBuffer.append(" ALTER COLUMN ");

                adapter.createTableAppendColumn(sqlBuffer, column);

                return Collections.singletonList(sqlBuffer.toString());
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

                StringBuffer sqlBuffer = new StringBuffer();
                QuotingStrategy context = adapter.getQuotingStrategy(getEntity()
                        .getDataMap()
                        .isQuotingSQLIdentifiers());
                sqlBuffer.append("ALTER TABLE ");
                sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
                sqlBuffer.append(" ALTER COLUMN ");

                adapter.createTableAppendColumn(sqlBuffer, column);

                return Collections.singletonList(sqlBuffer.toString());
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

    public String dropTable(DbEntity table) {
        QuotingStrategy context = getQuotingStrategy(table
                .getDataMap()
                .isQuotingSQLIdentifiers());
        StringBuffer buf = new StringBuffer("DROP TABLE IF EXISTS ");
        buf.append(context.quoteFullyQualifiedName(table));
        buf.append(" CASCADE");
        return buf.toString();
    }

    /**
 
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

        // statement
        StringBuffer buf = new StringBuffer();
        QuotingStrategy context = getQuotingStrategy(table
                .getDataMap()
                .isQuotingSQLIdentifiers());
        buf.append(context.quoteFullyQualifiedName(table));

        return Arrays.asList("SET FOREIGN_KEY_CHECKS=0", "DROP TABLE IF EXISTS "
                + buf.toString()
                + " CASCADE", "SET FOREIGN_KEY_CHECKS=1");
    }
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

    @Override
    public String createTable(DbEntity ent) {      
        QuotingStrategy context = getQuotingStrategy(ent.getDataMap().isQuotingSQLIdentifiers());
        StringBuilder buf = new StringBuilder();
        buf.append("CREATE TABLE ");
        buf.append(context.quoteFullyQualifiedName(ent));
        buf.append(" (");

        // columns
        Iterator<DbAttribute> it = ent.getAttributes().iterator();
        boolean first = true;
View Full Code Here

Examples of org.apache.cayenne.dba.QuotingStrategy.quoteFullyQualifiedName()

                StringBuffer sqlBuffer = new StringBuffer();
                QuotingStrategy context = adapter.getQuotingStrategy(getEntity()
                        .getDataMap()
                        .isQuotingSQLIdentifiers());
                sqlBuffer.append("ALTER TABLE ");
                sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
                sqlBuffer.append(" ADD ");
                boolean magnatory = column.isMandatory();
                column.setMandatory(false);
                adapter.createTableAppendColumn(sqlBuffer, column);
                if(magnatory){
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.