Oops, my un-PreparedStatement-ifying was booched.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2158 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -102,7 +102,7 @@ public abstract class BaseLiaison implements DatabaseLiaison
|
|||||||
}
|
}
|
||||||
update.append(")");
|
update.append(")");
|
||||||
|
|
||||||
Statement stmt = null;
|
Statement stmt = conn.createStatement();
|
||||||
try {
|
try {
|
||||||
stmt.executeUpdate(update.toString());
|
stmt.executeUpdate(update.toString());
|
||||||
} finally {
|
} finally {
|
||||||
@@ -122,7 +122,7 @@ public abstract class BaseLiaison implements DatabaseLiaison
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statement stmt = null;
|
Statement stmt = conn.createStatement();
|
||||||
try {
|
try {
|
||||||
stmt.executeUpdate("ALTER TABLE " + tableSQL(table) + " ADD COLUMN " +
|
stmt.executeUpdate("ALTER TABLE " + tableSQL(table) + " ADD COLUMN " +
|
||||||
columnSQL(column) + " " + definition);
|
columnSQL(column) + " " + definition);
|
||||||
@@ -138,7 +138,7 @@ public abstract class BaseLiaison implements DatabaseLiaison
|
|||||||
public boolean changeColumn (Connection conn, String table, String column, String definition)
|
public boolean changeColumn (Connection conn, String table, String column, String definition)
|
||||||
throws SQLException
|
throws SQLException
|
||||||
{
|
{
|
||||||
Statement stmt = null;
|
Statement stmt = conn.createStatement();
|
||||||
try {
|
try {
|
||||||
stmt.executeUpdate("ALTER TABLE " + tableSQL(table) + " CHANGE " +
|
stmt.executeUpdate("ALTER TABLE " + tableSQL(table) + " CHANGE " +
|
||||||
columnSQL(column) + " " + column + " " + definition);
|
columnSQL(column) + " " + column + " " + definition);
|
||||||
@@ -155,7 +155,7 @@ public abstract class BaseLiaison implements DatabaseLiaison
|
|||||||
public boolean renameColumn (Connection conn, String table, String from, String to)
|
public boolean renameColumn (Connection conn, String table, String from, String to)
|
||||||
throws SQLException
|
throws SQLException
|
||||||
{
|
{
|
||||||
Statement stmt = null;
|
Statement stmt = conn.createStatement();
|
||||||
try {
|
try {
|
||||||
String query = "ALTER TABLE " + tableSQL(table) + " RENAME COLUMN " +
|
String query = "ALTER TABLE " + tableSQL(table) + " RENAME COLUMN " +
|
||||||
columnSQL(from) + " TO " + columnSQL(to);
|
columnSQL(from) + " TO " + columnSQL(to);
|
||||||
@@ -175,7 +175,7 @@ public abstract class BaseLiaison implements DatabaseLiaison
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Statement stmt = null;
|
Statement stmt = conn.createStatement();
|
||||||
try {
|
try {
|
||||||
String query = "ALTER TABLE " + tableSQL(table) + " DROP COLUMN " + columnSQL(column);
|
String query = "ALTER TABLE " + tableSQL(table) + " DROP COLUMN " + columnSQL(column);
|
||||||
if (stmt.executeUpdate(query) == 1) {
|
if (stmt.executeUpdate(query) == 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user