This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def dynamicMethods = [ | |
| [regex:"hasPermission(.*)", method:this.&hasPermission], | |
| [regex:"create(.*)Permission", method:this.&createPermission]] | |
| def methodMissing(String name, args) { | |
| def method = dynamicMethods.find { name =~ it.regex} | |
| if(method) { | |
| def match = name =~ method.regex | |
| return method.method(match[0][1], * args) | |
| } else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with temp as (select d_codigo | |
| from (select d_codigo,d_estado, length(d_codigo) | |
| from colonia_tmp | |
| group by d_codigo,d_estado | |
| having length(d_codigo) = 4) newcode) | |
| update colonia_tmp set d_codigo= '0' || d_codigo where d_codigo in (select d_codigo from temp); |
NewerOlder