public SQLBuffer append(DBIdentifier name) { _sql.append(_dict.toDBName(name)); return this; }
/** * Convert the specified schema name to a name that the database will * be able to understand. */ public String convertSchemaCase(DBIdentifier objectName) { return toDBName(namingUtil.convertSchemaCase(objectName), false); }
/** * Return the sequence name used by databases for the given autoassigned * column. This is only used by databases that require an explicit name * to be used for auto-assign support. */ protected String getGeneratedKeySequenceName(Column col) { return toDBName(namingUtil.getGeneratedKeySequenceName(col, maxAutoAssignNameLength)); }
/** * Return the sequence name used by databases for the given autoassigned * column. This is only used by databases that require an explicit name * to be used for auto-assign support. */ protected String getGeneratedKeySequenceName(Column col) { return toDBName(namingUtil.getGeneratedKeySequenceName(col, maxAutoAssignNameLength)); }
/** * Return the sequence name used by databases for the given autoassigned * column. This is only used by databases that require an explicit name * to be used for auto-assign support. */ protected String getGeneratedKeySequenceName(Column col) { return toDBName(namingUtil.getGeneratedKeySequenceName(col, maxAutoAssignNameLength)); }
/** * Convert the specified schema name to a name that the database will * be able to understand. */ public String convertSchemaCase(DBIdentifier objectName) { return toDBName(namingUtil.convertSchemaCase(objectName), false); }
/** * Returns the full name of the index, including the schema (delimited * by the result of {@link #catalogSeparator}). */ public String getFullName(Index index) { if (!useSchemaName || DBIdentifier.isNull(index.getSchemaIdentifier())) return toDBName(index.getIdentifier()); return toDBName(index.getFullIdentifier()); }
/** * Returns the full name of the sequence, including the schema (delimited * by the result of {@link #catalogSeparator}). */ public String getFullName(Sequence seq) { if (!useSchemaName || DBIdentifier.isNull(seq.getSchemaIdentifier())) return toDBName(seq.getIdentifier()); return toDBName(seq.getFullIdentifier()); }
/** * Returns the full name of the sequence, including the schema (delimited * by the result of {@link #catalogSeparator}). */ public String getFullName(Sequence seq) { if (!useSchemaName || DBIdentifier.isNull(seq.getSchemaIdentifier())) return toDBName(seq.getIdentifier()); return toDBName(seq.getFullIdentifier()); }
protected String getGenKeySeqName(String query, Column col) { return MessageFormat.format(query, new Object[]{ toDBName(col.getIdentifier()), getFullName(col.getTable(), false), getGeneratedKeySequenceName(col), }); }
protected String getGenKeySeqName(String query, Column col) { return MessageFormat.format(query, new Object[]{ toDBName(col.getIdentifier()), getFullName(col.getTable(), false), getGeneratedKeySequenceName(col), }); }
/** * Return a series of SQL statements to drop the given primary key from * its table. Return an empty array if operation not supported. * Returns <code>ALTER TABLE <table name> DROP CONSTRAINT * <pk name></code> by default. */ public String[] getDropPrimaryKeySQL(PrimaryKey pk) { if (DBIdentifier.isNull(pk.getIdentifier())) return new String[0]; return new String[]{ "ALTER TABLE " + getFullName(pk.getTable(), false) + " DROP CONSTRAINT " + toDBName(pk.getIdentifier()) }; }
/** * Return a series of SQL statements to drop the given primary key from * its table. Return an empty array if operation not supported. * Returns <code>ALTER TABLE <table name> DROP CONSTRAINT * <pk name></code> by default. */ public String[] getDropPrimaryKeySQL(PrimaryKey pk) { if (DBIdentifier.isNull(pk.getIdentifier())) return new String[0]; return new String[]{ "ALTER TABLE " + getFullName(pk.getTable(), false) + " DROP CONSTRAINT " + toDBName(pk.getIdentifier()) }; }
/** * Return a series of SQL statements to drop the given primary key from * its table. Return an empty array if operation not supported. * Returns <code>ALTER TABLE <table name> DROP CONSTRAINT * <pk name></code> by default. */ public String[] getDropPrimaryKeySQL(PrimaryKey pk) { if (DBIdentifier.isNull(pk.getIdentifier())) return new String[0]; return new String[]{ "ALTER TABLE " + getFullName(pk.getTable(), false) + " DROP CONSTRAINT " + toDBName(pk.getIdentifier()) }; }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }
/** * Return the preferred database type name for the given column's type * from {@link Types}. */ public String getTypeName(Column col) { if (!DBIdentifier.isEmpty(col.getTypeIdentifier())) return appendSize(col, toDBName(col.getTypeIdentifier())); if (col.isAutoAssigned() && autoAssignTypeName != null) return appendSize(col, autoAssignTypeName); return appendSize(col, getTypeName(col.getType())); }