summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/webapp/events/onapplicationstart.cfm2
-rw-r--r--src/main/webapp/models/Host.cfc34
-rw-r--r--src/main/webapp/models/Query.cfc17
3 files changed, 25 insertions, 28 deletions
diff --git a/src/main/webapp/events/onapplicationstart.cfm b/src/main/webapp/events/onapplicationstart.cfm
index 392518b..671cc59 100644
--- a/src/main/webapp/events/onapplicationstart.cfm
+++ b/src/main/webapp/events/onapplicationstart.cfm
@@ -22,7 +22,7 @@
<cfloop query="loc.scripts">
<cffile action="read" file="#directory#/#name#" variable="loc.script_content">
- <cfset loc.sqlBatchList = REReplace(loc.script_content, ";\s*(\r?\n|$)", "#chr(7)#", "all")>
+ <cfset loc.sqlBatchList = REReplaceNoCase(loc.script_content, ";\s*(\r?\n|$)", "#chr(7)#", "all")>
<cfloop list="#loc.sqlBatchList#" index="loc.statement" delimiters="#chr(7)#">
<cfquery datasource="#get('dataSourceName')#">#preserveSingleQuotes(loc.statement)#</cfquery>
diff --git a/src/main/webapp/models/Host.cfc b/src/main/webapp/models/Host.cfc
index a69f039..22f9b88 100644
--- a/src/main/webapp/models/Host.cfc
+++ b/src/main/webapp/models/Host.cfc
@@ -14,7 +14,7 @@
<cfset var statement = "">
<cfif Len(this.db_type.batch_separator)>
- <cfset sql = REReplace(sql, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
+ <cfset sql = REReplaceNoCase(sql, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
</cfif>
<cftry>
@@ -67,13 +67,13 @@
<cfset var escaped_separator = ReReplace(arguments.statement_separator, "([^A-Za-z0-9])", "\\\1", "ALL")>
</cfif>
<cfif Len(this.db_type.batch_separator)>
- <cfset ddl_list = REReplace(arguments.ddl, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
+ <cfset ddl_list = REReplaceNoCase(arguments.ddl, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
<cfelse>
<cfset ddl_list = arguments.ddl>
</cfif>
- <cfset ddl_list = REReplace(ddl_list, "#escaped_separator#\s*(\r?\n|$)", "#chr(7)#", "all")>
+ <cfset ddl_list = REReplaceNoCase(ddl_list, "#escaped_separator#\s*(\r?\n|$)", "#chr(7)#", "all")>
- <cfloop list="#ddl_list#" index="statement" delimiters="#chr(7)#">
+ <cfloop list="#ddl_list#" index="statement" delimiters="#chr(7)#">
<cfif Len(trim(statement))>
<cfquery datasource="#this.db_type_id#_#arguments.datasourceName#">#PreserveSingleQuotes(statement)#</cfquery>
</cfif>
@@ -91,15 +91,15 @@
password=this.db_type_id & '_' & arguments.datasourceName,
customJDBCArguments=this.db_type.custom_jdbc_attributes,
timeout=0,
- allowed_select=true,
- allowed_insert=!local.isMySQL,
- allowed_update=!local.isMySQL,
- allowed_delete=!local.isMySQL,
- allowed_alter=!local.isMySQL,
- allowed_drop=!local.isMySQL,
- allowed_revoke=false,
- allowed_create=!local.isMySQL,
- allowed_grant=false,
+ allowed_select=true,
+ allowed_insert=!local.isMySQL,
+ allowed_update=!local.isMySQL,
+ allowed_delete=!local.isMySQL,
+ allowed_alter=!local.isMySQL,
+ allowed_drop=!local.isMySQL,
+ allowed_revoke=false,
+ allowed_create=!local.isMySQL,
+ allowed_grant=false,
pooling=false,
description = "Created on #DateFormat(Now(), 'mm/dd/yyyy')# #TimeFormat(Now(), 'hh:mm:ss tt')#"
);
@@ -122,18 +122,18 @@
<cffunction name="dropDatabase">
<cfargument name="databaseName" type="string">
- <cfset var statement = "">
+ <cfset var statement = "">
<cfif not IsDefined("this.db_type")>
<cfset this.db_type = model("DB_Type").findByKey(this.db_type_id)>
</cfif>
<cfset var sql = Replace(this.db_type.drop_script_template, '##databaseName##', this.db_type_id & '_' & ucase(databaseName), 'ALL')>
- <cfif Len(this.db_type.batch_separator)>
- <cfset sql = REReplace(sql, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
+ <cfif Len(this.db_type.batch_separator)>
+ <cfset sql = REReplaceNoCase(sql, "#chr(10)##this.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
</cfif>
- <cfloop list="#sql#" index="statement" delimiters="#chr(7)#">
+ <cfloop list="#sql#" index="statement" delimiters="#chr(7)#">
<cfquery datasource="#this.cf_dsn#">#PreserveSingleQuotes(statement)#</cfquery>
</cfloop>
diff --git a/src/main/webapp/models/Query.cfc b/src/main/webapp/models/Query.cfc
index df1c104..d6c7685 100644
--- a/src/main/webapp/models/Query.cfc
+++ b/src/main/webapp/models/Query.cfc
@@ -37,12 +37,12 @@
<cftransaction>
<cfif Len(this.schema_def.db_type.batch_separator)>
- <cfset sqlBatchList = REReplace(this.sql, "#chr(10)##this.schema_def.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
+ <cfset sqlBatchList = REReplaceNoCase(this.sql, "#chr(10)##this.schema_def.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
<cfelse>
<cfset sqlBatchList = this.sql>
</cfif>
- <cfset sqlBatchList = REReplace(sqlBatchList, "#escaped_separator#\s*(\r?\n|$)", "#chr(7)#", "all")>
+ <cfset sqlBatchList = REReplaceNoCase(sqlBatchList, "#escaped_separator#\s*(\r?\n|$)", "#chr(7)#", "all")>
<cfif this.schema_def.db_type.simple_name IS "Oracle">
<cfset local.defered_table = "DEFERRED_#Left(Hash(createuuid(), "MD5"), 8)#">
@@ -75,7 +75,7 @@
<cfset local.executionPlanSQL = Replace(local.executionPlanSQL, "##query_id##", this.id, "ALL")>
<cfif Len(this.schema_def.db_type.batch_separator)>
- <cfset local.executionPlanBatchList = REReplace(local.executionPlanSQL, "#chr(10)##this.schema_def.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
+ <cfset local.executionPlanBatchList = REReplaceNoCase(local.executionPlanSQL, "#chr(10)##this.schema_def.db_type.batch_separator#(#chr(13)#?)#chr(10)#", '#chr(7)#', 'all')>
<cfelse>
<cfset local.executionPlanBatchList = local.executionPlanSQL>
</cfif>
@@ -186,7 +186,7 @@
<cfset StructDelete(local, "executionPlan")>
<cfset StructDelete(local, "ret")>
- </cfloop>
+ </cfloop>
<cfcatch>
@@ -198,7 +198,7 @@
<cfset ArrayAppend(returnVal["sets"], {
succeeded = false,
errorMessage = "Explicit commits and DDL (ex: CREATE, DROP, RENAME, or ALTER) are not allowed within the query panel for Oracle. Put DDL in the schema panel instead."
- })>
+ })>
<cfelseif this.schema_def.db_type.simple_name IS "PostgreSQL" AND
REFindNoCase("current transaction is aborted, commands ignored until end of transaction block$", cfcatch.message)>
@@ -215,7 +215,7 @@
<cfset ArrayAppend(returnVal["sets"], {
succeeded = false,
errorMessage = "DDL and DML statements are not allowed in the query panel for MySQL; only SELECT statements are allowed. Put DDL and DML in the schema panel."
- })>
+ })>
<cfelse>
@@ -254,16 +254,14 @@
<cfset ArrayAppend(returnVal["sets"], {
succeeded = false,
errorMessage = (IsDefined("cfcatch.queryError") ? (cfcatch.message & ": " & cfcatch.queryError) : cfcatch.message)
- })>
+ })>
</cfcatch>
</cftry>
-
</cfcatch>
</cftry>
-
<cfif not local.hasQuerySets>
<cfloop from="1" to="#ArrayLen(returnVal['sets'])#" index="i" >
<cfset tmp= model("Query_Set").create({
@@ -282,7 +280,6 @@
</cfif>
-
</cfif>
<cfreturn returnVal>