Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv24296/Query
Modified Files:
alterTable.cfm
Log Message:
Functionality Added:
[ 773691 ] Added "ADD INDEX" AlterSpec
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** alterTable.cfm 18 Jul 2003 14:33:32 -0000 1.26
--- alterTable.cfm 18 Jul 2003 14:46:31 -0000 1.27
***************
*** 268,275 ****
</cfscript>
</cfcase>
<!--- "ADD INDEX" Alter Specification --->
! <!--- ToDo ---> <cfcase value="ADD INDEX"></cfcase>
<!--- "ADD PRIMARY KEY" Alter Specification --->
<!--- ToDo ---> <cfcase value="ADD PRIMARY KEY"></cfcase>
<!--- "ADD UNIQUE" Alter Specification --->
<cfcase value="ADD UNIQUE">
--- 268,319 ----
</cfscript>
</cfcase>
+
<!--- "ADD INDEX" Alter Specification --->
! <cfcase value="ADD INDEX">
! <cfscript>
! // Add "ADD UNIQUE" Keywords to Output Strings
! rawSQL = "#rawSQL# ADD INDEX";
! htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD INDEX</span>";
!
! // Add indexName to Output Strings
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].indexName#";
! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].indexName#</span>";
!
! //-----------------------------------------
! // Add Index Column Names to Output Strings
! //-----------------------------------------
!
! // Add Opening Bracked to Output Strings
! rawSQL = "#rawSQL# (";
! htmlSQL = "#htmlSQL# (";
!
! // Add Index Column Names to Output Strings
! for(j=1; j EQ arrayLen(ATTRIBUTES.alterSpec[i].index_col_names); j=j+1){
! // If this is a multi column index and is not the first Index Column Name, then add a comma to the last Index Column Name
! if(j GT 1){
! rawSQL = "#rawSQL#,";
! htmlSQL = "#htmlSQL#,";
! }
!
! // Add Index Column Name to Output Strings
! if(ATTRIBUTES.alterSpec[i].index_col_names[j] IS ""){
! rawSQL = "#rawSQL#NameNotSpecified";
! htmlSQL = "#htmlSQL#<span class=""Missing"">NameNotSpecified</span>";
! }
! else{
! rawSQL = "#rawSQL##ATTRIBUTES.alterSpec[i].index_col_names[j]#";
! htmlSQL = "#htmlSQL#<span class=""String"">#ATTRIBUTES.alterSpec[i].index_col_names[j]#</span>";
! }
! }
!
! // Add Closing Bracked to Output Strings
! rawSQL = "#rawSQL#)";
! htmlSQL = "#htmlSQL#)";
! </cfscript>
! </cfcase>
!
<!--- "ADD PRIMARY KEY" Alter Specification --->
<!--- ToDo ---> <cfcase value="ADD PRIMARY KEY"></cfcase>
+
<!--- "ADD UNIQUE" Alter Specification --->
<cfcase value="ADD UNIQUE">
|