提交 195add7e authored 作者: Thomas Mueller's avatar Thomas Mueller

Documentation.

上级 7905384f
...@@ -913,7 +913,7 @@ public class TestCsv { ...@@ -913,7 +913,7 @@ public class TestCsv {
rs.addColumn("EMAIL", Types.VARCHAR, 255, 0); rs.addColumn("EMAIL", Types.VARCHAR, 255, 0);
rs.addRow("Bob Meier", "bob.meier@abcde.abc"); rs.addRow("Bob Meier", "bob.meier@abcde.abc");
rs.addRow("John Jones", "john.jones@abcde.abc"); rs.addRow("John Jones", "john.jones@abcde.abc");
Csv.getInstance().write("data/test.csv", rs, null); new Csv().write("data/test.csv", rs, null);
} }
} }
</pre> </pre>
...@@ -928,8 +928,7 @@ import java.sql.*; ...@@ -928,8 +928,7 @@ import java.sql.*;
import org.h2.tools.Csv; import org.h2.tools.Csv;
public class TestCsv { public class TestCsv {
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
ResultSet rs = Csv.getInstance(). ResultSet rs = new Csv().read("data/test.csv", null, null);
read("data/test.csv", null, null);
ResultSetMetaData meta = rs.getMetaData(); ResultSetMetaData meta = rs.getMetaData();
while (rs.next()) { while (rs.next()) {
for (int i = 0; i &lt; meta.getColumnCount(); i++) { for (int i = 0; i &lt; meta.getColumnCount(); i++) {
......
...@@ -588,7 +588,6 @@ public class Select extends Query { ...@@ -588,7 +588,6 @@ public class Select extends Query {
topTableFilter.startQuery(session); topTableFilter.startQuery(session);
topTableFilter.reset(); topTableFilter.reset();
boolean exclusive = isForUpdate && !isForUpdateMvcc; boolean exclusive = isForUpdate && !isForUpdateMvcc;
topTableFilter.lock(session, exclusive, exclusive);
if (isForUpdateMvcc) { if (isForUpdateMvcc) {
if (isGroupQuery) { if (isGroupQuery) {
throw DbException.getUnsupportedException("FOR UPDATE && GROUP"); throw DbException.getUnsupportedException("FOR UPDATE && GROUP");
...@@ -602,6 +601,7 @@ public class Select extends Query { ...@@ -602,6 +601,7 @@ public class Select extends Query {
throw DbException.getUnsupportedException("FOR UPDATE && JOIN"); throw DbException.getUnsupportedException("FOR UPDATE && JOIN");
} }
} }
topTableFilter.lock(session, exclusive, exclusive);
ResultTarget to = result != null ? result : target; ResultTarget to = result != null ? result : target;
if (limitRows != 0) { if (limitRows != 0) {
if (isQuickAggregateQuery) { if (isQuickAggregateQuery) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论