提交 8a3fd959 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 4d2ff2a0
...@@ -16,6 +16,7 @@ import java.util.ArrayList; ...@@ -16,6 +16,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import org.h2.util.IOUtils; import org.h2.util.IOUtils;
import org.h2.util.JdbcUtils;
import org.h2.util.StringUtils; import org.h2.util.StringUtils;
public class FileSystemDatabase { public class FileSystemDatabase {
...@@ -107,7 +108,7 @@ public class FileSystemDatabase { ...@@ -107,7 +108,7 @@ public class FileSystemDatabase {
prep.setString(2, getName(fullName)); prep.setString(2, getName(fullName));
prep.setLong(3, System.currentTimeMillis()); prep.setLong(3, System.currentTimeMillis());
prep.execute(); prep.execute();
ResultSet rs = prep.getGeneratedKeys(); ResultSet rs = JdbcUtils.getGeneratedKeys(prep);
rs.next(); rs.next();
id = rs.getLong(1); id = rs.getLong(1);
prep = prepare("INSERT INTO FILEDATA(ID, DATA) VALUES(?, ?)"); prep = prepare("INSERT INTO FILEDATA(ID, DATA) VALUES(?, ?)");
...@@ -237,7 +238,7 @@ public class FileSystemDatabase { ...@@ -237,7 +238,7 @@ public class FileSystemDatabase {
prep.setLong(2, parentId); prep.setLong(2, parentId);
prep.setLong(3, System.currentTimeMillis()); prep.setLong(3, System.currentTimeMillis());
prep.execute(); prep.execute();
rs = prep.getGeneratedKeys(); rs = JdbcUtils.getGeneratedKeys(prep);
rs.next(); rs.next();
parentId = rs.getLong(1); parentId = rs.getLong(1);
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论