Skip to content

Commit

Permalink
fixed issue #4008 wrong parsing of timestamp (long values)
Browse files Browse the repository at this point in the history
  • Loading branch information
luigidellaquila committed Apr 24, 2015
1 parent d4815be commit 8c11fea
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 29 deletions.
12 changes: 6 additions & 6 deletions core/src/main/grammar/OrientSQL.jjt
Expand Up @@ -466,7 +466,7 @@ OInteger Integer():
} }
{ {
( (
[ <MINUS> {sign = -1;} ] tokenVal = <INTEGER_LITERAL> {jjtThis.value = sign * Integer.parseInt(tokenVal.image);} [ <MINUS> {sign = -1;} ] tokenVal = <INTEGER_LITERAL> {jjtThis.value = sign * Long.parseLong(tokenVal.image);}
) { return jjtThis; } ) { return jjtThis; }
} }


Expand Down Expand Up @@ -2338,7 +2338,7 @@ OUnwind Unwind():
} }




java.lang.Integer Limit(): java.lang.Number Limit():
{ OInteger value = null; } { OInteger value = null; }
{ {
( (
Expand All @@ -2347,7 +2347,7 @@ java.lang.Integer Limit():
{ return value.getValue(); } { return value.getValue(); }
} }


java.lang.Integer Skip(): java.lang.Number Skip():
{ OInteger value = null;} { OInteger value = null;}
{ {
( (
Expand All @@ -2358,7 +2358,7 @@ java.lang.Integer Skip():
} }




java.lang.Integer Timeout(): java.lang.Number Timeout():
{ OInteger val; } { OInteger val; }
{ {
( (
Expand All @@ -2368,7 +2368,7 @@ java.lang.Integer Timeout():
} }




java.lang.Integer Wait(): java.lang.Number Wait():
{ OInteger val; } { OInteger val; }
{ {
( (
Expand All @@ -2378,7 +2378,7 @@ java.lang.Integer Wait():
} }




java.lang.Integer Retry(): java.lang.Number Retry():
{ OInteger val; } { OInteger val; }
{ {
( (
Expand Down
Expand Up @@ -27,8 +27,8 @@ public class OCreateEdgeStatement extends OStatement {
protected OIdentifier rightIdentifier; protected OIdentifier rightIdentifier;


protected OInsertBody body; protected OInsertBody body;
protected Integer retry; protected Number retry;
protected Integer wait; protected Number wait;


public OCreateEdgeStatement(int id) { public OCreateEdgeStatement(int id) {
super(id); super(id);
Expand Down
Expand Up @@ -30,7 +30,7 @@ public class ODeleteEdgeStatement extends OStatement {


protected OWhereClause whereClause; protected OWhereClause whereClause;


protected Integer limit; protected Number limit;


public ODeleteEdgeStatement(int id) { public ODeleteEdgeStatement(int id) {
super(id); super(id);
Expand Down
Expand Up @@ -4,7 +4,7 @@


public class OInteger extends ONumber { public class OInteger extends ONumber {


protected Integer value; protected Number value;


public OInteger(int id) { public OInteger(int id) {
super(id); super(id);
Expand All @@ -14,11 +14,11 @@ public OInteger(OrientSql p, int id) {
super(p, id); super(p, id);
} }


public Integer getValue() { public Number getValue() {
return value; return value;
} }


public void setValue(Integer value) { public void setValue(Number value) {
this.value = value; this.value = value;
} }


Expand Down
Expand Up @@ -29,17 +29,17 @@ public class OSelectStatement extends OStatement {


protected OUnwind unwind; protected OUnwind unwind;


protected Integer skip; protected Number skip;


protected Integer limit; protected Number limit;


protected Boolean lockRecord; protected Boolean lockRecord;


protected OFetchPlan fetchPlan; protected OFetchPlan fetchPlan;


protected OLetClause letClause; protected OLetClause letClause;


protected Integer timeout; protected Number timeout;


protected Boolean parallel; protected Boolean parallel;


Expand Down Expand Up @@ -139,19 +139,19 @@ public void setOrderBy(OOrderBy orderBy) {
this.orderBy = orderBy; this.orderBy = orderBy;
} }


public Integer getSkip() { public Number getSkip() {
return skip; return skip;
} }


public void setSkip(Integer skip) { public void setSkip(Number skip) {
this.skip = skip; this.skip = skip;
} }


public Integer getLimit() { public Number getLimit() {
return limit; return limit;
} }


public void setLimit(Integer limit) { public void setLimit(Number limit) {
this.limit = limit; this.limit = limit;
} }


Expand Down
Expand Up @@ -18,7 +18,7 @@ public enum Strategy {


protected OWhereClause whereClause; protected OWhereClause whereClause;


protected Integer limit; protected Number limit;


protected Strategy strategy; protected Strategy strategy;


Expand Down Expand Up @@ -80,7 +80,7 @@ public void replaceParameters(Map<Object, Object> params) {
} }


if (projections != null) { if (projections != null) {
for(OTraverseProjectionItem item:projections) { for (OTraverseProjectionItem item : projections) {
item.replaceParameters(params); item.replaceParameters(params);
} }
} }
Expand Down
Expand Up @@ -24,8 +24,8 @@ public class OUpdateStatement extends OStatement {


protected boolean lockRecord = false; protected boolean lockRecord = false;


protected Integer limit; protected Number limit;
protected Integer timeout; protected Number timeout;


public OUpdateStatement(int id) { public OUpdateStatement(int id) {
super(id); super(id);
Expand Down
Expand Up @@ -205,7 +205,7 @@ final public OInteger Integer() throws ParseException {
; ;
} }
tokenVal = jj_consume_token(INTEGER_LITERAL); tokenVal = jj_consume_token(INTEGER_LITERAL);
jjtn000.value = sign * Integer.parseInt(tokenVal.image); jjtn000.value = sign * Long.parseLong(tokenVal.image);
jjtree.closeNodeScope(jjtn000, true); jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false; jjtc000 = false;
jjtn000.jjtSetLastToken(getToken(0)); jjtn000.jjtSetLastToken(getToken(0));
Expand Down Expand Up @@ -6425,7 +6425,7 @@ final public OUnwind Unwind() throws ParseException {
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }


final public java.lang.Integer Limit() throws ParseException { final public java.lang.Number Limit() throws ParseException {
/*@bgen(jjtree) Limit */ /*@bgen(jjtree) Limit */
OLimit jjtn000 = new OLimit(JJTLIMIT); OLimit jjtn000 = new OLimit(JJTLIMIT);
boolean jjtc000 = true; boolean jjtc000 = true;
Expand Down Expand Up @@ -6461,7 +6461,7 @@ final public java.lang.Integer Limit() throws ParseException {
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }


final public java.lang.Integer Skip() throws ParseException { final public java.lang.Number Skip() throws ParseException {
/*@bgen(jjtree) Skip */ /*@bgen(jjtree) Skip */
OSkip jjtn000 = new OSkip(JJTSKIP); OSkip jjtn000 = new OSkip(JJTSKIP);
boolean jjtc000 = true; boolean jjtc000 = true;
Expand Down Expand Up @@ -6509,7 +6509,7 @@ final public java.lang.Integer Skip() throws ParseException {
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }


final public java.lang.Integer Timeout() throws ParseException { final public java.lang.Number Timeout() throws ParseException {
/*@bgen(jjtree) Timeout */ /*@bgen(jjtree) Timeout */
OTimeout jjtn000 = new OTimeout(JJTTIMEOUT); OTimeout jjtn000 = new OTimeout(JJTTIMEOUT);
boolean jjtc000 = true; boolean jjtc000 = true;
Expand Down Expand Up @@ -6545,7 +6545,7 @@ final public java.lang.Integer Timeout() throws ParseException {
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }


final public java.lang.Integer Wait() throws ParseException { final public java.lang.Number Wait() throws ParseException {
/*@bgen(jjtree) Wait */ /*@bgen(jjtree) Wait */
OWait jjtn000 = new OWait(JJTWAIT); OWait jjtn000 = new OWait(JJTWAIT);
boolean jjtc000 = true; boolean jjtc000 = true;
Expand Down Expand Up @@ -6581,7 +6581,7 @@ final public java.lang.Integer Wait() throws ParseException {
throw new Error("Missing return statement in function"); throw new Error("Missing return statement in function");
} }


final public java.lang.Integer Retry() throws ParseException { final public java.lang.Number Retry() throws ParseException {
/*@bgen(jjtree) Retry */ /*@bgen(jjtree) Retry */
ORetry jjtn000 = new ORetry(JJTRETRY); ORetry jjtn000 = new ORetry(JJTRETRY);
boolean jjtc000 = true; boolean jjtc000 = true;
Expand Down

0 comments on commit 8c11fea

Please sign in to comment.