[Mydatabasepilot-cvs] MyDatabasePilot/Query alterTable.cfm,1.15,1.16
Status: Alpha
Brought to you by:
nanoface
From: <nan...@us...> - 2003-06-18 13:33:40
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv25588/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 756592 ] Added Logic for location "FIRST" when adding a new column to a table Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** alterTable.cfm 17 Jun 2003 21:12:22 -0000 1.15 --- alterTable.cfm 18 Jun 2003 13:33:33 -0000 1.16 *************** *** 184,190 **** <!--- If location is set to "Beginning" ... ---> <cfif ATTRIBUTES.alterSpec[i].colLocation IS "Beginning"> ! <!--- ToDo: ---> ! ! <!--- Elseif Loctaion is not End, that means a location is specified between other coloumns ... ---> <cfelseif ATTRIBUTES.alterSpec[i].colLocation IS NOT "End"> <!--- Add AFTER Keyword to Output Strings ---> --- 184,212 ---- <!--- If location is set to "Beginning" ... ---> <cfif ATTRIBUTES.alterSpec[i].colLocation IS "Beginning"> ! <!--- If it's the first column to be added ... ---> ! <cfif i is 1> ! <!--- Add FIRST Keyword to Output Strings ---> ! <cfset rawSQL = "#rawSQL# FIRST" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">FIRST</span>" /> ! <!--- Otherwise ... ---> ! <cfelse> ! <!--- Add AFTER Keyword to Output Strings ---> ! <cfset rawSQL = "#rawSQL# AFTER" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">AFTER</span>" /> ! ! <!--- 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> ! <!--- 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 ---> |