/** * Return a series of SQL statements to drop the given index. Returns * <code>DROP INDEX <index name></code> by default. */ public String[] getDropIndexSQL(Index index) { return new String[]{ "DROP INDEX " + getFullName(index) }; }
/** * Return a series of SQL statements to drop the given sequence. Returns * <code>DROP SEQUENCE <sequence name></code> by default. */ public String[] getDropSequenceSQL(Sequence seq) { return new String[]{ "DROP SEQUENCE " + getFullName(seq) }; }
/** * Return a series of SQL statements to drop the given sequence. Returns * <code>DROP SEQUENCE <sequence name></code> by default. */ public String[] getDropSequenceSQL(Sequence seq) { return new String[]{ "DROP SEQUENCE " + getFullName(seq) }; }
/** * Return a series of SQL statements to drop the given index. Returns * <code>DROP INDEX <index name></code> by default. */ public String[] getDropIndexSQL(Index index) { return new String[]{ "DROP INDEX " + getFullName(index) }; }
/** * Return a series of SQL statements to drop the given index. Returns * <code>DROP INDEX <index name></code> by default. */ public String[] getDropIndexSQL(Index index) { return new String[]{ "DROP INDEX " + getFullName(index) }; }
/** * Return a series of SQL statements to drop the given index. Returns * <code>DROP INDEX <index name></code> by default. */ public String[] getDropIndexSQL(Index index) { return new String[]{ "DROP INDEX " + getFullName(index) }; }
/** * Return a series of SQL statements to drop the given sequence. Returns * <code>DROP SEQUENCE <sequence name></code> by default. */ public String[] getDropSequenceSQL(Sequence seq) { return new String[]{ "DROP SEQUENCE " + getFullName(seq) }; }
/** * Return a series of SQL statements to drop the given sequence. Returns * <code>DROP SEQUENCE <sequence name></code> by default. */ public String[] getDropSequenceSQL(Sequence seq) { return new String[]{ "DROP SEQUENCE " + getFullName(seq) }; }
/** * Return a series of SQL statements to drop the given table. Indexes * will be dropped separately. Returns * <code>DROP TABLE <table name></code> by default. */ public String[] getDropTableSQL(Table table) { String drop = MessageFormat.format(dropTableSQL, new Object[]{ getFullName(table, false) }); return new String[]{ drop }; }
/** * Return a series of SQL statements to drop the given table. Indexes * will be dropped separately. Returns * <code>DROP TABLE <table name></code> by default. */ public String[] getDropTableSQL(Table table) { String drop = MessageFormat.format(dropTableSQL, new Object[]{ getFullName(table, false) }); return new String[]{ drop }; }
/** * Return the SQL for a prepared statement delete on this row. */ private String getDeleteSQL(DBDictionary dict) { StringBuilder buf = new StringBuilder(); buf.append("DELETE FROM "). append(dict.getFullName(getTable(), false)); appendWhere(buf, dict); return buf.toString(); }
/** * Return the SQL for a prepared statement delete on this row. */ private String getDeleteSQL(DBDictionary dict) { StringBuilder buf = new StringBuilder(); buf.append("DELETE FROM "). append(dict.getFullName(getTable(), false)); appendWhere(buf, dict); return buf.toString(); }
/** * Return the SQL for a prepared statement delete on this row. */ private String getDeleteSQL(DBDictionary dict) { StringBuilder buf = new StringBuilder(); buf.append("DELETE FROM "). append(dict.getFullName(getTable(), false)); appendWhere(buf, dict); return buf.toString(); }
/** * Return the SQL for a prepared statement delete on this row. */ private String getDeleteSQL(DBDictionary dict) { StringBuilder buf = new StringBuilder(); buf.append("DELETE FROM "). append(dict.getFullName(getTable(), false)); appendWhere(buf, dict); return buf.toString(); }
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), }); }
protected static void appendJoinCount(SQLBuffer sql, Select sel, Joins joins, DBDictionary dict, FieldMapping field, ForeignKey fk) { String fullTable = dict.getFullName(fk.getTable(), false); sql.append("(SELECT COUNT(*) FROM ").append(fullTable). append(" WHERE "); appendUnaliasedJoin(sql, sel, joins, dict, field, fk); sql.append(")"); }
protected static void appendJoinCount(SQLBuffer sql, Select sel, Joins joins, DBDictionary dict, FieldMapping field, ForeignKey fk) { String fullTable = dict.getFullName(fk.getTable(), false); sql.append("(SELECT COUNT(*) FROM ").append(fullTable). append(" WHERE "); appendUnaliasedJoin(sql, sel, joins, dict, field, fk); sql.append(")"); }
protected static void appendJoinCount(SQLBuffer sql, Select sel, Joins joins, DBDictionary dict, FieldMapping field, ForeignKey fk) { String fullTable = dict.getFullName(fk.getTable(), false); sql.append("(SELECT COUNT(*) FROM ").append(fullTable). append(" WHERE "); appendUnaliasedJoin(sql, sel, joins, dict, field, fk); sql.append(")"); }
protected static void appendJoinCount(SQLBuffer sql, Select sel, Joins joins, DBDictionary dict, FieldMapping field, ForeignKey fk) { String fullTable = dict.getFullName(fk.getTable(), false); sql.append("(SELECT COUNT(*) FROM ").append(fullTable). append(" WHERE "); appendUnaliasedJoin(sql, sel, joins, dict, field, fk); sql.append(")"); }