Skip to content

Commit

Permalink
fix #587 support for automatic table creation with JPA (#709)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingfudeshi authored and zhangthen committed Apr 3, 2019
1 parent acdd872 commit 3d7d6fa
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
/**
* The type Statement proxy.
*
* @author sharajava
*
* @param <T> the type parameter
* @author sharajava
*/
public class StatementProxy<T extends Statement> extends AbstractStatementProxy<T> {

Expand Down Expand Up @@ -58,7 +57,7 @@ public StatementProxy(AbstractConnectionProxy connectionWrapper, T targetStateme

@Override
public ConnectionProxy getConnectionProxy() {
return (ConnectionProxy)super.getConnectionProxy();
return (ConnectionProxy) super.getConnectionProxy();
}

@Override
Expand All @@ -67,7 +66,7 @@ public ResultSet executeQuery(String sql) throws SQLException {
return ExecuteTemplate.execute(this, new StatementCallback<ResultSet, T>() {
@Override
public ResultSet execute(Statement statement, Object... args) throws SQLException {
return statement.executeQuery((String)args[0]);
return statement.executeQuery((String) args[0]);
}
}, sql);
}
Expand All @@ -78,15 +77,20 @@ public int executeUpdate(String sql) throws SQLException {
return ExecuteTemplate.execute(this, new StatementCallback<Integer, T>() {
@Override
public Integer execute(Statement statement, Object... args) throws SQLException {
return statement.executeUpdate((String)args[0]);
return statement.executeUpdate((String) args[0]);
}
}, sql);
}

@Override
public boolean execute(String sql) throws SQLException {
// TODO
return false;
this.targetSQL = sql;
return ExecuteTemplate.execute(this, new StatementCallback<Boolean, T>() {
@Override
public Boolean execute(T statement, Object... args) throws SQLException {
return statement.execute((String) args[0]);
}
}, sql);
}

@Override
Expand Down

0 comments on commit 3d7d6fa

Please sign in to comment.