anchor.diff: -<!--- 
  +<!---
    *
    * Copyright (c) 2016, Lucee Assosication Switzerland. All rights reserved.*
    *
    * This library is free software; you can redistribute it and/or
    * modify it under the terms of the GNU Lesser General Public
  - * License as published by the Free Software Foundation; either 
  + * License as published by the Free Software Foundation; either
    * version 2.1 of the License, or (at your option) any later version.
  - * 
  + *
    * This library is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    * Lesser General Public License for more details.
  - * 
  - * You should have received a copy of the GNU Lesser General Public 
  + *
  + * You should have received a copy of the GNU Lesser General Public
    * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
  - * 
  + *
    ---><cfscript>
   component extends="org.lucee.cfml.test.LuceeTestCase"	{
  -	
  -	
  +
  +
   	//public function afterTests(){}
  -	
  +
   	public function setUp(){
   		variables.has=defineDatasource();
   	}
   
   	public void function testConnection(){
   		if(!variables.has) return;
  -		
  +
   		query name="local.qry" {
   			echo("select 'AA' as a");
   		}
   		assertEquals("AA",qry.a);
  -		
  +
  +	}
  +
  +	public function testLDEV1063(){
  +
  +		if(!variables.has) return;
  +
  +		query name="local.qry" params=[election:"2016-11-08"] { echo("
  +		--	SELECT CAST(:election as date) AS election_date;
  +		    SELECT :election::date AS election_date;
  +		"); }
  +
  +		assertEquals("2016-11-08", qry.election_date);
   	}
   
   	private boolean function defineDatasource(){
   		var pgsql=getCredencials();
   		if(pgsql.count()==0) return false;
  -		application action="update" 
  +		application action="update"
   			datasource="#{
   	  class: 'org.postgresql.Driver'
   	, bundleName: 'org.lucee.postgresql'
  
positive.code: 	, username: pgsql.username
  	, password: pgsql.password
  }#";
  	
  	return true;
  	}
  
  
negative.code: 		}
  		// getting the credetials from the system variables
  		else if(
  			!isNull(server.system.properties.POSTGRE_SERVER) &&
  			!isNull(server.system.properties.POSTGRE_USERNAME) &&
  			!isNull(server.system.properties.POSTGRE_PASSWORD) &&
  			!isNull(server.system.properties.POSTGRE_PORT) &&
  			!isNull(server.system.properties.POSTGRE_DATABASE)) {
  			pgsql.server=server.system.properties.POSTGRE_SERVER;
  			pgsql.username=server.system.properties.POSTGRE_USERNAME;
  