提交 978f142f authored 作者: dyorgio's avatar dyorgio

Corrected new trigger view with generated keys unit test.

上级 1b70401a
......@@ -337,14 +337,13 @@ public class TestTriggersConstraints extends TestBase implements Trigger {
public void init(Connection conn, String schemaName,
String triggerName, String tableName, boolean before, int type)
throws SQLException {
prepInsert = conn.prepareStatement("insert into test values(?)", Statement.RETURN_GENERATED_KEYS);
prepInsert = conn.prepareStatement("insert into test values()", Statement.RETURN_GENERATED_KEYS);
}
@Override
public void fire(Connection conn, Object[] oldRow, Object[] newRow)
throws SQLException {
if (newRow != null) {
prepInsert.setInt(1, (Integer) newRow[0]);
prepInsert.execute();
ResultSet rs = prepInsert.getGeneratedKeys();
if (rs.next()) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论