提交 1f9fcba2 authored 作者: Thomas Mueller's avatar Thomas Mueller

The JDBC escape syntax {ts 'value'} did not interpret the value as a timestamp.…

The JDBC escape syntax {ts 'value'} did not interpret the value as a timestamp. The same for {d 'value'} (for date) and {t 'value'} (for time). Thanks to Lukas Eder for reporting the issue.
上级 8422d921
......@@ -17,12 +17,15 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>File system abstraction: support replacing existing files using move
(currently not for Windows).
<ul><li>The JDBC escape syntax {ts 'value'} did not interpret the value as a timestamp.
The same for {d 'value'} (for date) and {t 'value'} (for time).
Thanks to Lukas Eder for reporting the issue.
</li><li>File system abstraction: support replacing existing files using move
(currently not for Windows).
</li><li>The statement "shutdown defrag" now compresses the database (with the MVStore).
</li><li>The MVStore now automatically shrinks the file in the background if there is no read or write activity.
This might be a bit too aggressive; feedback is welcome!
</li><li>Change default value of PAGE_SIZE from 2048 to 4096 to more closely match most filesystems block size
</li><li>Change default value of PAGE_SIZE from 2048 to 4096 to more closely match most file systems block size
(PageStore only; the MVStore already used 4096).
</li><li>Auto-scale MAX_MEMORY_ROWS and CACHE_SIZE settings by the amount of available RAM. Gives a better
out of box experience for people with more powerful machines.
......
......@@ -2727,15 +2727,18 @@ public class Parser {
r = new SequenceValue(sequence);
} else if (currentTokenType == VALUE &&
currentValue.getType() == Value.STRING) {
if (equalsToken("DATE", name)) {
if (equalsToken("DATE", name) ||
equalsToken("D", name)) {
String date = currentValue.getString();
read();
r = ValueExpression.get(ValueDate.parse(date));
} else if (equalsToken("TIME", name)) {
} else if (equalsToken("TIME", name) ||
equalsToken("T", name)) {
String time = currentValue.getString();
read();
r = ValueExpression.get(ValueTime.parse(time));
} else if (equalsToken("TIMESTAMP", name)) {
} else if (equalsToken("TIMESTAMP", name) ||
equalsToken("TS", name)) {
String timestamp = currentValue.getString();
read();
r = ValueExpression
......
......@@ -1359,11 +1359,11 @@ public class JdbcConnection extends TraceObject implements Connection {
} else if (found(sql, start, "oj")) {
remove = 2;
} else if (found(sql, start, "ts")) {
remove = 2;
break;
} else if (found(sql, start, "t")) {
remove = 1;
break;
} else if (found(sql, start, "d")) {
remove = 1;
break;
} else if (found(sql, start, "params")) {
remove = "params".length();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论