Package org.apache.cayenne.dba

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


        buffer.append(context.quoteString(firstColumn.getName()));

        while (it.hasNext()) {
            DbAttribute column = it.next();
            buffer.append(", ");
            buffer.append(context.quoteString(column.getName()));
        }
        buffer.append(")");
        return buffer.toString();
    }
View Full Code Here


                .getDataMap()
                .isQuotingSQLIdentifiers());
        sqlBuffer.append("ALTER TABLE ");
        sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
        sqlBuffer.append(" DROP COLUMN ");
        sqlBuffer.append(context.quoteString(getColumn().getName()));

        return Collections.singletonList(sqlBuffer.toString());
    }

    public String getTokenName() {
View Full Code Here

                .getDataMap()
                .isQuotingSQLIdentifiers());
        sqlBuffer.append("ALTER TABLE ");
        sqlBuffer.append(context.quoteFullyQualifiedName(getEntity()));
        sqlBuffer.append(" ALTER COLUMN ");
        sqlBuffer.append(context.quoteString(getColumn().getName()));
        sqlBuffer.append(" SET NOT NULL");

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

                        .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);

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

                        .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);

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

        String entName = entity.getName();
        String seqName = _SEQUENCE_PREFIX + entName;

        if (entity.getSchema() != null && entity.getSchema().length() > 0) {
            if(context!=null){
                seqName = context.quoteString(entity.getSchema()) +
                 "." + context.quoteString(seqName);
           } else {
                seqName = entity.getSchema() + "." + seqName;
           }
        }
View Full Code Here

        String seqName = _SEQUENCE_PREFIX + entName;

        if (entity.getSchema() != null && entity.getSchema().length() > 0) {
            if(context!=null){
                seqName = context.quoteString(entity.getSchema()) +
                 "." + context.quoteString(seqName);
           } else {
                seqName = entity.getSchema() + "." + seqName;
           }
        }
       
View Full Code Here

           } else {
                seqName = entity.getSchema() + "." + seqName;
           }
        }
       
        return context.quoteString(seqName);
    }

    /**
     * Returns DROP SEQUENCE statement.
     */
 
View Full Code Here

                        + "': "
                        + at.getType());
            }

            String type = types[0];
            buf.append(context.quoteString(at.getName())).append(' ').append(type);

            // append size and precision (if applicable)
            if (TypesMapping.supportsLength(at.getType())) {
                int len = at.getMaxLength();
                int scale = TypesMapping.isDecimal(at.getType()) ? at.getScale() : -1;
View Full Code Here

                    firstPk = false;
                else
                    buf.append(", ");

                DbAttribute at = pkit.next();
                buf.append(context.quoteString(at.getName()));
            }
            buf.append(')');
        }
        buf.append(')');
        return buf.toString();
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.