Simple regex assist
ColdFusionIf you're still writing some sql create and update statements by hand these may help you. Mainly, I wanted to post these so I wouldn't forget them.
Create a list of cfqueryparam's from a list of cfargumen's. If you don't do any column renaming in your code then this is straight forward:
Find: <cfargument name="(\w+)" type="(\w+)" [^>]+>Replace With: <cfqueryparam value="Arguments.$1" cfslqtype="cf_sql_$2" />,
This next one will create all the values of an update statement from the list of cfqueryparam's, again if no column renaming has been done this is a one shot find/replace:
Find: (<cfqueryparam value="Arguments.([^"]+)" [^>]+>,?)Replace With: $2 = $1



Loading....