[Mydatabasepilot-cvs] MyDatabasePilot/Query alterTable.cfm,1.19,1.20
Status: Alpha
Brought to you by:
nanoface
From: <nan...@us...> - 2003-06-20 20:51:00
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv32574/Query Modified Files: alterTable.cfm Log Message: Internal Structure Changed: [ 758157 ] Converted Some Code to <CFScript> Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** alterTable.cfm 20 Jun 2003 20:21:24 -0000 1.19 --- alterTable.cfm 20 Jun 2003 20:50:53 -0000 1.20 *************** *** 224,251 **** <!--- Elseif Loctaion is not set to "End", that means a location is specified between other coloumns ... ---> <cfelseif ATTRIBUTES.alterSpec[i].colLocation IS NOT "End"> ! <!--- Add AFTER Keyword to Output Strings ---> ! <cfset rawSQL = "#rawSQL# AFTER" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">AFTER</span>" /> ! <!--- If it's the first column to be added ... ---> ! <cfif i is 1> ! <!--- Set location to AFTER the specified location ---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colLocation#" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].colLocation#</span>" /> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Set index of Last Column ---> ! <cfset lastColumn = i-1> ! <!--- Make sure last column to be added has a specified name ---> ! <cfif ATTRIBUTES.alterSpec[lastColumn].colName IS ""> ! <cfset rawSQL = "#rawSQL# NameNotSpecified_#lastColumn#" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#lastColumn#</span>" /> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Set location to AFTER the last column to be added ---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[lastColumn].colName#" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[lastColumn].colName#</span>" /> ! </cfif> ! </cfif> </cfif> </cfif> --- 224,251 ---- <!--- Elseif Loctaion is not set to "End", that means a location is specified between other coloumns ... ---> <cfelseif ATTRIBUTES.alterSpec[i].colLocation IS NOT "End"> ! <cfscript> ! // Add AFTER Keyword to Output Strings ! rawSQL = "#rawSQL# AFTER"; ! htmlSQL = "#htmlSQL# <span class=""KeyWord"">AFTER</span>"; ! // If it's the first column to be added ... ! if(i is 1){ ! // Set location to AFTER the specified location ! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colLocation#"; ! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].colLocation#</span>"; ! }else{ ! // Set index of Last Column ! lastColumn = i-1; ! // Make sure last column to be added has a specified name ! if(ATTRIBUTES.alterSpec[lastColumn].colName IS ""){ ! rawSQL = "#rawSQL# NameNotSpecified_#lastColumn#"; ! htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#lastColumn#</span>"; ! }else{ ! // Set location to AFTER the last column to be added ! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[lastColumn].colName#"; ! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[lastColumn].colName#</span>"; ! } ! } ! </cfscript> </cfif> </cfif> |