anchor.diff:  		</cfscript>
   	</cffunction>
   
  -	<cffunction name="addTableDef" output="false" returntype="void">
  -		<cfargument name="tabledef" type="tabledef" required="true">
  -		<cfset variables.tabledefs[arguments.tabledef.instance.name] = arguments.tabledef/>
  -	</cffunction>
   
   	<cfscript>
   		public tabledef function makeTable( required tabledef tabledef ){
  
positive.code: 
  	</cfscript>
  
  </cfcomponent>
negative.code: 			LOCAL.lines = LOCAL.reader.getLineNumber();
  			LOCAL.fileReader.close();
  			LOCAL.reader.close();
  
  			// Strip out line feeds, tabs and multiple spaces
  			LOCAL.content = "#trim(reReplaceNoCase(arguments.sql,chr(9),' ','all'))#";
  			LOCAL.content = reReplaceNoCase(LOCAL.content,chr(10),' ','all');
  			LOCAL.content = reReplaceNoCase(LOCAL.content,'[[:space:]]{2,2}',' ','all');
  			LOCAL.content = "#lines+1##chr(444)##now()##chr(444)##this.getDSN()##chr(444)##createUUID()##chr(444)##trim(LOCAL.content)##chr(10)#";
  
  			// Append transaction to file.
  			fileWriteLine( newFile, '#encrypt(LOCAL.content,'0E69C1BB-BABA-4D48-A7C9D60D020485B0')##chr(555)#' );
  			fileClose( newFile );
  		}
  
  		// Database Generic Functions
  
  		/**
  		* I prepare a parameter value for SQL execution when not using cfqueryparam.  Basically I try to do the same thing as cfqueryparam.
  		**/
  		public function prepareNonQueryParamValue( required string value, required string cfsqltype, required boolean null ){
  			var LOCAL = {};
  
  			if( arguments.cfSQLType is "cf_sql_timestamp" or arguments.cfSQLType is "cf_sql_date" ){
  				if( arguments.value is "0000-00-00 00:00" ){
  					LOCAL.ret = "'#arguments.value#'";
  				}else if( isDate(arguments.value) ){
  					LOCAL.ret = createODBCDateTime(arguments.value);
  				}else{
  					LOCAL.ret = "'0000-00-00 00:00'";
  				}
  			}else if( arguments.cfSQLType is "cf_sql_integer" ){
  				LOCAL.ret = val( arguments.value );
  			}else if( arguments.cfSQLType is "cf_sql_boolean" ){
  				LOCAL.ret = val( arguments.value );
  			}else if( isSimpleValue( arguments.value ) ){
  				LOCAL.ret = "'#arguments.value#'";
  			}
  
  			return LOCAL.ret;
  
  		}
  
  		/**
  		* I prepare a parameter value for SQL execution when not using cfqueryparam.  Basically I try to do the same thing as cfqueryparam.
  		**/
  		public function getNonQueryParamFormattedValue( required string value, required string cfsqltype, required string list, required boolean null ){
  			var ret = "";
  
  			if( arguments.list ){
  				for( var idx in listToArray( arguments.value ) ){
  					ret = listAppend( ret,
  						prepareNonQueryParamValue(
  							value = listGetAt( arguments.value, idx ),
  							cfsqltype = arguments.cfsqltype,
  							null = arguments.null
  						) );
  				}
  
  			}else{
  				ret = prepareNonQueryParamValue(
  						value = arguments.value,
  						cfsqltype = arguments.cfsqltype,
  						null = arguments.null
  					);
  			}
  
  			return ret;
  
  		}
  
  		/**
  		* I determine the CFSQL type for the passd value and return the proper type as a string to be used in cfqueryparam.
  		*/
  		public function getCFSQLType( required string type ){
  
  			var int_types = "int,integer,numeric,number,cf_sql_integer";
  			var string_types = "varchar,char,text,memo,nchar,nvarchar,ntext,cf_sql_varchar";
  			var date_types = "datetime,date,cf_sql_date";
  			var decimal_types = "decimal,cf_sql_decimal";
  			var money_types = "money,cf_sql_money";
  			var timestamp_types = "timestamp,cf_sql_timestamp";
  			var double_types = "double,cf_sql_double";
  			var bit_types = "bit";
  			// Default return = varchar
  			var ret = "cf_sql_varchar";
  
  			if( listFindNoCase( int_types, arguments.type ) ){
  				ret = "cf_sql_integer";
  			}else if( listFindNoCase( string_types, arguments.type ) ){
  				ret = "cf_sql_varchar";
  			}else if( listFindNoCase( date_types, arguments.type ) ){
  				ret = "cf_sql_date";
  			}else if( listFindNoCase( decimal_types, arguments.type ) ){
  				ret = "cf_sql_decimal";
  			}else if( listFindNoCase( money_types, arguments.type ) ){
  				ret = "cf_sql_money";
  			}else if( listFindNoCase( double_types, arguments.type ) ){
  				ret = "cf_sql_double";
  			}else if( listFindNoCase( timestamp_types, arguments.type ) ){
  				ret = "cf_sql_timestamp";
  			}else if( listFindNoCase( bit_types, arguments.type ) ){
  				ret = "cf_sql_bit";
  			}
  
  			return ret;
  		}
  
  		/**
  		* I return the structure of the passed table.
  		**/
  		public query function define( required string table ) {
  			var def = this.conn.define( arguments.table );
  
  			return def;
  		}
  
  		public void function setUseCFQueryParams( required boolean useCFQueryParams ){
  			this.useCFQueryParams = arguments.useCFQueryParams;
  			this.conn.useCFQueryParams = arguments.useCFQueryParams;
  		}
  
  		public boolean function getUseCFQueryParams(){
  			return this.conn.getUseCFQueryParams();
  		}
  
  		/**
  		* I return a list of tables for the current database
  		**/
      	public query function getTables(){
  			return this.conn.getTables();
  		}
  
  		/**
  		* I return a list of columns for the passed table
  		**/
  		public function getColumns( required string table ){
  			var def = new tabledef( tablename = arguments.table, dsn = variables.dsn );
  			var cols = def.getColumns();
  
  			if( !len( trim( cols ) ) ){
  				cols = "*";
  			}
  
  			return cols;
  		}
  	/**
  	* I get the primary key for the given table. To do this I envoke the getPrimaryKey from the conneted database type.
  	**/
  		public function getPrimaryKey( required string table ){
  			return this.conn.getPrimaryKey( arguments.table );
  		}
  		/**
  		* I take a list of columns and return it as a safe columns list with each column wrapped within the DB specific escape characters.
  		**/
  		public function getSafeColumnNames( required string cols ){
  			return this.conn.getSafeColumnNames( arguments.cols );;
  		}
  
  		/**
  		*I take a single column name and return it as a safe columns list with each column wrapped within the DB specific escape characters.
  		**/
  		public function getSafeColumnName( required string col ){
  			return this.conn.getSafeColumnName( arguments.col );
  		}
  
  		/**
  		* I return the opening escape character for a column name.
  		**/
  		public function getSafeIdentifierStartChar(){
  			return this.conn.getSafeIdentifierStartChar();
  		}
  
  		/**
  		* I return the closing escape character for a column name.
  		**/
  		public function getSafeIdentifierEndChar(){
  			return this.conn.getSafeIdentifierEndChar();
  		}
  
  		public function addTableDef( required tabledef tabledef ){
  			variables.tabledefs[ arguments.tabledef.instance.name ] = arguments.tabledef;
  		}
  
  		/**
  		* I create the values to build the cfqueryparam tag.
  		* @value The value to be queryparam'd
  		* @cfsqltype This can be a standard RDBS datatype or a cf_sql_type (see getCFSQLType())
  		* @list Whether or not to param as a list (i.e. for passing a param'd list to IN() statements )
  		* @null Whether the value is null or not
  		**/
  		public function queryParam( required string value, string cfsqltype = "cf_sql_varchar", boolean list = false, boolean null = false ){
  
  			var returnString = {};
  			var returnStruct = {};
  
  			returnStruct = queryParamStruct( value = trim( arguments.value ), cfsqltype = arguments.cfsqltype, list = arguments.list, null = arguments.null );
  	 		returnString = '#chr(998)#list=#chr(777)##returnStruct.list##chr(777)# null=#chr(777)##returnStruct.null##chr(777)# cfsqltype=#chr(777)##returnStruct.cfsqltype##chr(777)# value=#chr(777)##returnStruct.value##chr(777)##chr(999)#';
  			return returnString;
  		}
  		/**
  		* I create the struct used to build the cfqueryparam tag.
  		* @value The value to be queryparam'd
  		* @cfsqltype This can be a standard RDBS datatype or a cf_sql_type (see getCFSQLType())
  		* @list Whether or not to param as a list (i.e. for passing a param'd list to IN() statements )
  		* @null Whether the value is null or not
  		**/
  		public function queryParamStruct( required string value, string cfsqltype = "cf_sql_varchar", boolean list = false, boolean null = false ){
  			var returnStruct = {};
  
  			returnStruct.cfsqltype = reReplaceNoCase( getCFSQLType( arguments.cfsqltype ), '\$queryparam', 'INVALID', 'all' );
  			// strip out any queryparam calls in the value, this will prevent the ability to submit malicious code through the SQL string
  			returnStruct.value = reReplaceNoCase( arguments.value, '\$queryparam', 'INVALID', 'all');
  			returnStruct.list = reReplaceNoCase( arguments.list, '\$queryparam', 'INVALID', 'all');
  			returnStruct.null = reReplaceNoCase( arguments.null, '\$queryparam', 'INVALID', 'all');
  
  			return returnStruct;
  		}
  
  
  
  	</cfscript>
  
  
  
  	<cffunction name="parameterizeSQL" output="true" access="public" returntype="struct" hint="I build a struct containing all of the where clause of the SQL statement, parameterized when possible.  The returned struct will contain an array of each parameterized clause containing the data necessary to build a <cfqueryparam> tag.">
  		<cfargument name="sql" type="string" required="true" hint="SQL statement (or partial SQL statement) which contains tokenized queryParam calls">
  