Strabon

changeset 806:286493843743 DiffDateTime

diffDateTime function can now take constants as arguments
author George Garbis <ggarbis@di.uoa.gr>
date Fri Dec 14 18:11:04 2012 +0200 (2012-12-14)
parents feaee3e3e582
children 1163025f7c46
files postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java
line diff
     1.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Fri Dec 14 13:14:40 2012 +0200
     1.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Fri Dec 14 18:11:04 2012 +0200
     1.3 @@ -13,6 +13,7 @@
     1.4  import org.openrdf.sail.generaldb.algebra.GeneralDBDateTimeColumn;
     1.5  import org.openrdf.sail.generaldb.algebra.GeneralDBDoubleValue;
     1.6  import org.openrdf.sail.generaldb.algebra.GeneralDBLabelColumn;
     1.7 +import org.openrdf.sail.generaldb.algebra.GeneralDBNumberValue;
     1.8  import org.openrdf.sail.generaldb.algebra.GeneralDBNumericColumn;
     1.9  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlAbove;
    1.10  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlAnd;
    1.11 @@ -1348,22 +1349,10 @@
    1.12  				String raw = arg.getValue();
    1.13  				filter.append(" "+raw+" ");
    1.14  			}
    1.15 -//			else if(expr.getLeftArg() instanceof GeneralDBDoubleValue) //case met in buffer!
    1.16 -//			{
    1.17 -//				append(((GeneralDBDoubleValue)expr.getLeftArg()), filter);
    1.18 -//			}
    1.19 -//			else if(expr.getLeftArg() instanceof GeneralDBNumericColumn) //case met in buffer!
    1.20 -//			{
    1.21 -//				append(((GeneralDBNumericColumn)expr.getLeftArg()), filter);
    1.22 -//			}
    1.23 -//			else if(expr.getLeftArg() instanceof GeneralDBURIColumn) //case met in transform!
    1.24 -//			{
    1.25 -//				filter.keepSRID_part1();
    1.26 -//				append(((GeneralDBURIColumn)expr.getLeftArg()), filter);
    1.27 -//				filter.keepSRID_part2();
    1.28 -//				append(((GeneralDBURIColumn)expr.getLeftArg()), filter);
    1.29 -//				filter.keepSRID_part3();
    1.30 -//			}
    1.31 +			else if(expr.getLeftArg() instanceof GeneralDBNumberValue)
    1.32 +			{
    1.33 +				append(((GeneralDBNumberValue)expr.getLeftArg()), filter);
    1.34 +			}
    1.35  			else if(expr.getLeftArg() instanceof GeneralDBDateTimeColumn)
    1.36  			{
    1.37  				append(((GeneralDBDateTimeColumn)expr.getLeftArg()),filter);
    1.38 @@ -1384,22 +1373,10 @@
    1.39  				String raw = arg.getValue();
    1.40  				filter.append(" "+raw+" ");
    1.41  			}
    1.42 -//			else if(expr.getRightArg() instanceof GeneralDBDoubleValue) //case met in buffer!
    1.43 -//			{
    1.44 -//				append(((GeneralDBDoubleValue)expr.getRightArg()), filter);
    1.45 -//			}
    1.46 -//			else if(expr.getRightArg() instanceof GeneralDBNumericColumn) //case met in buffer!
    1.47 -//			{
    1.48 -//				append(((GeneralDBNumericColumn)expr.getRightArg()), filter);
    1.49 -//			}
    1.50 -//			else if(expr.getRightArg() instanceof GeneralDBURIColumn) //case met in transform!
    1.51 -//			{
    1.52 -//				filter.keepSRID_part1();
    1.53 -//				append(((GeneralDBURIColumn)expr.getRightArg()), filter);
    1.54 -//				filter.keepSRID_part2();
    1.55 -//				append(((GeneralDBURIColumn)expr.getRightArg()), filter);
    1.56 -//				filter.keepSRID_part3();
    1.57 -//			}
    1.58 +			else if(expr.getRightArg() instanceof GeneralDBNumberValue)
    1.59 +			{
    1.60 +				append(((GeneralDBNumberValue)expr.getRightArg()), filter);
    1.61 +			}
    1.62  			else if(expr.getRightArg() instanceof GeneralDBDateTimeColumn)
    1.63  			{
    1.64  				append(((GeneralDBDateTimeColumn)expr.getRightArg()),filter);