提交 93d67a86 authored 作者: Owner's avatar Owner

Fixed typos and spelling - and java 8 import

上级 68f0dfec
...@@ -201,7 +201,7 @@ Can be used to create a recursive query. ...@@ -201,7 +201,7 @@ Can be used to create a recursive query.
For recursive queries the first select has to be a UNION. For recursive queries the first select has to be a UNION.
Non-recursive queries are also supported, Non-recursive queries are also supported,
One or more common table entries can be use referred to by name. One or more common table entries can be use referred to by name.
Column name declarations are now optional - the column names will be gleaned from the named select queries. Column name declarations are now optional - the column names will be inferred from the named select queries.
Positional parameters are not currently correctly supported. Positional parameters are not currently correctly supported.
"," ","
WITH RECURSIVE t(n) AS ( WITH RECURSIVE t(n) AS (
......
...@@ -18,7 +18,6 @@ import java.util.Comparator; ...@@ -18,7 +18,6 @@ import java.util.Comparator;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.api.Trigger; import org.h2.api.Trigger;
...@@ -4865,7 +4864,9 @@ public class Parser { ...@@ -4865,7 +4864,9 @@ public class Parser {
Table recursiveTable; Table recursiveTable;
ArrayList<Column> columns = New.arrayList(); ArrayList<Column> columns = New.arrayList();
String[] cols = null; String[] cols = null;
// column names are now optiona;
// column names are now optional - they can be inferred from the named
// query if not supplied
if(readIf("(")){ if(readIf("(")){
cols = parseColumnList(); cols = parseColumnList();
for (String c : cols) { for (String c : cols) {
...@@ -4907,9 +4908,6 @@ public class Parser { ...@@ -4907,9 +4908,6 @@ public class Parser {
querySQL = StringUtils.cache(withQuery.getPlanSQL()); querySQL = StringUtils.cache(withQuery.getPlanSQL());
ArrayList<Expression> withExpressions = withQuery.getExpressions(); ArrayList<Expression> withExpressions = withQuery.getExpressions();
for (int i = 0; i < withExpressions.size(); ++i) { for (int i = 0; i < withExpressions.size(); ++i) {
//System.out.println("columnName="+withExpressions.get(i).getColumnName());
//System.out.println("alias="+withExpressions.get(i).getAlias());
//System.out.println("nonAliasExpression="+withExpressions.get(i).getNonAliasExpression());
String columnName = cols != null ? cols[i] : withExpressions.get(i).getColumnName(); String columnName = cols != null ? cols[i] : withExpressions.get(i).getColumnName();
columnTemplateList.add(new Column(columnName, withExpressions.get(i).getType())); columnTemplateList.add(new Column(columnName, withExpressions.get(i).getType()));
} }
...@@ -4918,10 +4916,6 @@ public class Parser { ...@@ -4918,10 +4916,6 @@ public class Parser {
} }
int id = database.allocateObjectId(); int id = database.allocateObjectId();
boolean isRecursive = RecursiveQuery.isRecursive(tempViewName,querySQL); boolean isRecursive = RecursiveQuery.isRecursive(tempViewName,querySQL);
//System.out.println("tempViewName=>"+tempViewName+"<");
//System.out.println("columnTemplateList="+columnTemplateList.stream().map(Column::toStringWithType).collect(Collectors.toList()));
//System.out.println("isRecursive="+isRecursive);
//System.out.println("querySQL="+querySQL);
TableView view = new TableView(schema, id, tempViewName, querySQL, TableView view = new TableView(schema, id, tempViewName, querySQL,
parameters, columnTemplateList.toArray(new Column[0]), session, parameters, columnTemplateList.toArray(new Column[0]), session,
isRecursive); isRecursive);
......
...@@ -12,7 +12,7 @@ adapting adaptive add added addiction adding addition additional additionally ...@@ -12,7 +12,7 @@ adapting adaptive add added addiction adding addition additional additionally
additions addon addr address addressed addresses adds adeptia adjacent adjust additions addon addr address addressed addresses adds adeptia adjacent adjust
adjusted adjusts admin administration administrator admins admission ado adopt adjusted adjusts admin administration administrator admins admission ado adopt
advanced advances advantage advantages advised aeiou aejaks aelig aes afaik advanced advances advantage advantages advised aeiou aejaks aelig aes afaik
affect affected affects affero affine after afterwards again against agar age affect affected affects affero affine affinity after afterwards again against agar age
agent agentlib agg aggregate aggregated aggregates aggregating aggressive agile agent agentlib agg aggregate aggregated aggregates aggregating aggressive agile
agrave agree agreeable agreed agreement agreements agrees ahead agrave agree agreeable agreed agreement agreements agrees ahead
ahilmnqbjkcdeopfrsg aid ajax alan alarm ale alefsym alert alessio alexander alfki ahilmnqbjkcdeopfrsg aid ajax alan alarm ale alefsym alert alessio alexander alfki
...@@ -300,7 +300,7 @@ icmpgt icmple icmplt icmpne ico icon iconified icons iconst icu ide idea ideal ...@@ -300,7 +300,7 @@ icmpgt icmple icmplt icmpne ico icon iconified icons iconst icu ide idea ideal
ideas identical identification identified identifier identifiers identify identifying ideas identical identification identified identifier identifiers identify identifying
identities identity idiomatic idiv idle ids idx idxname iee ieee iexcl iface ifeq identities identity idiomatic idiv idle ids idx idxname iee ieee iexcl iface ifeq
ifexists ifge ifgt ifle iflt ifne ifnonnull ifnull iframe ifx ignore ignorecase ignored ifexists ifge ifgt ifle iflt ifne ifnonnull ifnull iframe ifx ignore ignorecase ignored
ignoredriverprivileges ignorelist ignores ignoring igrave iinc ikura ikvm ikvmc ignoredriverprivileges ignorelist ignores ignoring ignite igrave iinc ikura ikvm ikvmc
illegal iload image imageio images imaginary img iml immediately immutable imola imp illegal iload image imageio images imaginary img iml immediately immutable imola imp
impact imperial impersonate impl imple implement implementation implementations impact imperial impersonate impl imple implement implementation implementations
implemented implementing implements implication implicit implicitly implied implemented implementing implements implication implicit implicitly implied
...@@ -315,7 +315,7 @@ indemnified indemnify indemnity indent indentation indentations indented indents ...@@ -315,7 +315,7 @@ indemnified indemnify indemnity indent indentation indentations indented indents
independent independently index indexdef indexed indexer indexers indexes indexid independent independently index indexdef indexed indexer indexers indexes indexid
indexing indicate indicated indicates indicating indication indicator indices indexing indicate indicated indicates indicating indication indicator indices
indirect indirectly individual individually indkey indonesia industries indirect indirectly individual individually indkey indonesia industries
inefficient ineg inet inf infin infinite infinity infix inflate inflater info inefficient ineg inet inf inferred infin infinite infinity infix inflate inflater info
inform information informational informed informix informs informtn infos inform information informational informed informix informs informtn infos
infrastructure infringe infringed infringement infringements infringes infringing infrastructure infringe infringed infringement infringements infringes infringing
inherent inherit inheritance inherited inherits ini init initial initialization inherent inherit inheritance inherited inherits ini init initial initialization
...@@ -434,7 +434,7 @@ obligation obligations observer obsolete obtain obtained obtains obviously ...@@ -434,7 +434,7 @@ obligation obligations observer obsolete obtain obtained obtains obviously
occasionally occupied occupies occupy occur occurred occurrence occurrences occurs occasionally occupied occupies occupy occur occurred occurrence occurrences occurs
ocirc octal octet october octype odbc odbcad odd odg off offending offer offered ocirc octal octet october octype odbc odbcad odd odg off offending offer offered
offering offers office official offline offset offsets often ogc ograve ohloh oid okay offering offers office official offline offset offsets often ogc ograve ohloh oid okay
okra olap olapsys old older oldest oline oliver olivier omega omicron omissions okra olap olapsys old older oldest oline oliver olivier omega omicron omissions omit
omitted omitting once onchange onclick one ones onfocus ongoing onkeydown onkeyup omitted omitting once onchange onclick one ones onfocus ongoing onkeydown onkeyup
online onload only onmousedown onmousemove onmouseout onmouseover onmouseup online onload only onmousedown onmousemove onmouseout onmouseover onmouseup
onreadystatechange onresize onscroll onsubmit onto ontology ontoprise oome oops onreadystatechange onresize onscroll onsubmit onto ontology ontoprise oome oops
...@@ -477,7 +477,7 @@ pointing points poker poland polar pole poleposition policies policy polish poll ...@@ -477,7 +477,7 @@ pointing points poker poland polar pole poleposition policies policy polish poll
polling polski poly polygon pom pondered poodle pool poolable pooled pooling polling polski poly polygon pom pondered poodle pool poolable pooled pooling
pools poor poormans pop popular populate populated population popup port pools poor poormans pop popular populate populated population popup port
portability portable portal portals ported porting portion portions portlet ports portability portable portal portals ported porting portion portions portlet ports
portugal portugu pos position positioned positions positive pospichal possibility portugal portugu pos position positioned positions positional positive pospichal possibility
possible possibly post postal postfix postgre postgres postgresql posting possible possibly post postal postfix postgre postgres postgresql posting
postmaster potential potentially poultry pound pow power powerful poweroff postmaster potential potentially poultry pound pow power powerful poweroff
practicable practice prd pre prec precedence precision precisions predicate practicable practice prd pre prec precedence precision precisions predicate
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论