提交 b78408d6 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 5d1d7a1e
#Sat Nov 24 19:01:03 CET 2007
#Sat Dec 01 09:41:20 CET 2007
javac=javac
benchmark.drivers.dir=C\:/data/java
path.servlet.jar=C\:/data/classpath/servlet-api.jar
version.name.maven=1.0.62
version.name.maven=1.0.63
path.lucene.jar=C\:/data/classpath/lucene-core-2.2.0.jar
jdk=1.4
......@@ -78,7 +78,7 @@ Example:
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.0.62</version>
<version>1.0.63</version>
</dependency>
</pre>
<p>
......
......@@ -15,10 +15,10 @@ H2 Database Engine
<h1>Downloads</h1>
<h3>Version 1.0.62 (2007-11-25, Current)</h3>
<h3>Version 1.0.63 (2007-12-02, Current)</h3>
<p>
<a href="http://www.h2database.com/h2-setup-2007-11-25.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2007-11-25.zip">Platform-Independent Zip</a><br />
<a href="http://www.h2database.com/h2-setup-2007-12-02.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2007-12-02.zip">Platform-Independent Zip</a><br />
</p>
<h3>Download Mirror</h3>
......
......@@ -31,17 +31,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
<table style="border: 0px; margin: 5px; background-color: #eee;">
<tr><td style="border: 0px; background-color: #eee;" colspan="2">
<h3>Download</h3>
Version 1.0.62 (2007-11-25):
Version 1.0.63 (2007-12-02):
</td></tr>
<tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2007-11-25.exe"><img border="1" src="images/download.png" alt="download" /></a>
<a href="http://www.h2database.com/h2-setup-2007-12-02.exe"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2007-11-25.exe">Windows Installer (2.8 MB)</a>
<a href="http://www.h2database.com/h2-setup-2007-12-02.exe">Windows Installer (2.8 MB)</a>
</td></tr>
<tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2007-11-25.zip"><img border="1" src="images/download.png" alt="download" /></a>
<a href="http://www.h2database.com/h2-2007-12-02.zip"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2007-11-25.zip">All platforms (zip, 3.9 MB)</a>
<a href="http://www.h2database.com/h2-2007-12-02.zip">All platforms (zip, 3.9 MB)</a>
</td></tr>
<tr><td style="border: 0px; background-color: #eee;" colspan="2">
<a href="download.html">All Downloads</a>
......
......@@ -4,6 +4,7 @@
*/
package org.h2.command.dml;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.h2.command.Prepared;
......@@ -39,7 +40,8 @@ public class Call extends Prepared {
setCurrentRowNumber(1);
Value v = value.getValue(session);
if (v.getType() == Value.RESULT_SET) {
return LocalResult.read(session, ((ValueResultSet) v).getResultSet(), maxrows);
ResultSet rs = ((ValueResultSet) v).getResultSet();
return LocalResult.read(session, rs, maxrows);
} else if (v.getType() == Value.ARRAY) {
Value[] list = ((ValueArray) v).getList();
ObjectArray expr = new ObjectArray();
......
......@@ -72,8 +72,8 @@ import org.h2.constant.SysProperties;
*/
public class Constants {
public static final int BUILD_ID = 62;
private static final String BUILD = "2007-11-25";
public static final int BUILD_ID = 63;
private static final String BUILD = "2007-12-02";
public static final int VERSION_MAJOR = 1;
public static final int VERSION_MINOR = 0;
......
......@@ -6,6 +6,7 @@ package org.h2.expression;
import java.sql.SQLException;
import java.util.HashMap;
import org.h2.command.Parser;
import org.h2.command.dml.Select;
import org.h2.constant.ErrorCode;
......
......@@ -32,12 +32,14 @@ import org.h2.table.LinkSchema;
import org.h2.table.TableFilter;
import org.h2.tools.CompressTool;
import org.h2.tools.Csv;
import org.h2.tools.SimpleResultSet;
import org.h2.util.MathUtils;
import org.h2.util.MemoryUtils;
import org.h2.util.ObjectArray;
import org.h2.util.ObjectUtils;
import org.h2.util.RandomUtils;
import org.h2.util.StringUtils;
import org.h2.value.DataType;
import org.h2.value.Value;
import org.h2.value.ValueArray;
import org.h2.value.ValueBoolean;
......@@ -1702,9 +1704,30 @@ public class Function extends Expression implements FunctionCall {
}
}
result.done();
ValueResultSet vr = ValueResultSet.getCopy(result, Integer.MAX_VALUE);
ValueResultSet vr = ValueResultSet.get(getSimpleResultSet(result, Integer.MAX_VALUE));
return vr;
}
SimpleResultSet getSimpleResultSet(LocalResult rs, int maxrows) throws SQLException {
int columnCount = rs.getVisibleColumnCount();
SimpleResultSet simple = new SimpleResultSet();
for (int i = 0; i < columnCount; i++) {
String name = rs.getColumnName(i);
int sqlType = DataType.convertTypeToSQLType(rs.getColumnType(i));
int precision = MathUtils.convertLongToInt(rs.getColumnPrecision(i));
int scale = rs.getColumnScale(i);
simple.addColumn(name, sqlType, precision, scale);
}
rs.reset();
for (int i = 0; i < maxrows && rs.next(); i++) {
Object[] list = new Object[columnCount];
for (int j = 0; j < columnCount; j++) {
list[j] = rs.currentRow()[j].getObject();
}
simple.addRow(list);
}
return simple;
}
public void setColumns(ObjectArray columns) {
this.columnList = new Column[columns.size()];
......
......@@ -463,9 +463,6 @@ implements XAConnection, XAResource, JdbcConnectionListener
if ((flags & XAResource.TMSUSPEND) != 0) {
buff.append("|XAResource.TMSUSPEND");
}
if ((flags & XAResource.XA_OK) != 0) {
buff.append("|XAResource.XA_OK");
}
if ((flags & XAResource.XA_RDONLY) != 0) {
buff.append("|XAResource.XA_RDONLY");
}
......
......@@ -40,17 +40,31 @@ public class LocalResult implements ResultInterface {
private int diskOffset;
private boolean isUpdateCount;
private int updateCount;
public static LocalResult read(Session session, ResultSet rs, int maxrows) throws SQLException {
ResultSetMetaData meta = rs.getMetaData();
ObjectArray cols = getExpressionColumns(session, rs);
int columnCount = cols.size();
LocalResult result = new LocalResult(session, cols, columnCount);
for (int i = 0; (maxrows == 0 || i < maxrows) && rs.next(); i++) {
Value[] list = new Value[columnCount];
for (int j = 0; j < columnCount; j++) {
int type = result.getColumnType(j);
list[j] = DataType.readValue(session, rs, j + 1, type);
}
result.addRow(list);
}
result.done();
return result;
}
private static ObjectArray getExpressionColumns(Session session, ResultSet rs) throws SQLException {
ResultSetMetaData meta = rs.getMetaData();
int columnCount = meta.getColumnCount();
ObjectArray cols = new ObjectArray();
int[] types = new int[columnCount];
ObjectArray cols = new ObjectArray(columnCount);
Database db = session == null ? null : session.getDatabase();
for (int i = 0; i < columnCount; i++) {
String name = meta.getColumnLabel(i + 1);
int type = DataType.convertSQLTypeToValueType(meta.getColumnType(i + 1));
types[i] = type;
int precision = meta.getPrecision(i + 1);
int scale = meta.getScale(i + 1);
int displaySize = meta.getColumnDisplaySize(i + 1);
......@@ -58,16 +72,7 @@ public class LocalResult implements ResultInterface {
Expression expr = new ExpressionColumn(db, col);
cols.add(expr);
}
LocalResult result = new LocalResult(session, cols, columnCount);
for (int i = 0; (maxrows == 0 || i < maxrows) && rs.next(); i++) {
Value[] list = new Value[columnCount];
for (int j = 0; j < columnCount; j++) {
list[j] = DataType.readValue(session, rs, j + 1, types[j]);
}
result.addRow(list);
}
result.done();
return result;
return cols;
}
public LocalResult(int updateCount) {
......
......@@ -7,6 +7,7 @@ package org.h2.table;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import org.h2.constant.ErrorCode;
import org.h2.engine.Session;
import org.h2.expression.Expression;
......@@ -135,7 +136,8 @@ public class FunctionTable extends Table {
return new LocalResult(0);
} else {
ValueResultSet value = (ValueResultSet) v;
return LocalResult.read(session, value.getResultSet(), 0);
ResultSet rs = value.getResultSet();
return LocalResult.read(session, rs, 0);
}
}
......
......@@ -10,9 +10,7 @@ import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import org.h2.message.Message;
import org.h2.result.LocalResult;
import org.h2.tools.SimpleResultSet;
import org.h2.util.MathUtils;
public class ValueResultSet extends Value {
......@@ -27,28 +25,6 @@ public class ValueResultSet extends Value {
return val;
}
public static ValueResultSet getCopy(LocalResult rs, int maxrows) throws SQLException {
int columnCount = rs.getVisibleColumnCount();
SimpleResultSet simple = new SimpleResultSet();
ValueResultSet val = new ValueResultSet(simple);
for (int i = 0; i < columnCount; i++) {
String name = rs.getColumnName(i);
int sqlType = DataType.convertTypeToSQLType(rs.getColumnType(i));
int precision = MathUtils.convertLongToInt(rs.getColumnPrecision(i));
int scale = rs.getColumnScale(i);
simple.addColumn(name, sqlType, precision, scale);
}
rs.reset();
for (int i = 0; i < maxrows && rs.next(); i++) {
Object[] list = new Object[columnCount];
for (int j = 0; j < columnCount; j++) {
list[j] = rs.currentRow()[j].getObject();
}
simple.addRow(list);
}
return val;
}
public static ValueResultSet getCopy(ResultSet rs, int maxrows) throws SQLException {
ResultSetMetaData meta = rs.getMetaData();
int columnCount = meta.getColumnCount();
......
......@@ -153,7 +153,7 @@ java org.h2.test.TestAll timer
toString: > the parameters for the prepared statements.
autocomplete only just after meaningful key (ctrl+space, space, bs, interpunctation, ...)
autocomplete only just after meaningful key (ctrl+space, space, bs, ...)
write more tests for the command line tools
......
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.test.unit;
import java.sql.SQLException;
......
......@@ -514,5 +514,5 @@ opensource atlassian hhh establish pawel nice italiano ucchino paolo italian pie
uklinux credential crypt kerberos redferni routine reopen tmp configured replicating wraps jre
webtest einstellung redirects endless ran gives replication lxabcdef asf packages replayed jspa
russian backward alexahin vlad ffffffffffff bfff ffffffff webapp undeploy initializer brasil uncached slowing translating uploaded
llc computing oliver road
llc computing oliver road inaccessible android velasques duplicates eduardo chunk brazilian near langpair xrmd xmkd
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论