thanks! uploading to trunk.

Massimo

On Dec 13, 4:26 pm, rfx_labs <[email protected]> wrote:
> this is the patch for this:
>
> @@ -151,7 +151,7 @@
>          return 'Random()'
>      def NOT_NULL(self,default):
>          return 'NOT NULL DEFAULT %s' % default
> -    def SUBSTRING(self,fieldname,pos,lenght):
> +    def SUBSTRING(self,fieldname,pos,length):
>          return 'SUBSTR(%s,%s,%s)' % (fieldname, pos, length)
>      def PRIMARY_KEY(self,key):
>          return 'PRIMARY KEY(%s)' % key
> @@ -386,7 +386,7 @@
>          }
>      def RANDOM(self):
>          return 'RAND()'
> -    def SUBSTRING(self,fieldname,pos,lenght):
> +    def SUBSTRING(self,fieldname,pos,length):
>          return 'SUBSTRING(%s,%s,%s)' % (fieldname, pos, length)
>      def DROP(self,table,mode):
>          # breaks db integrity but without this mysql does not drop
> table
> @@ -605,7 +605,7 @@
>          return 'LEFT OUTER JOIN'
>      def RANDOM(self):
>          return 'NEWID()'
> -    def SUBSTRING(self,fieldname,pos,lenght):
> +    def SUBSTRING(self,fieldname,pos,length):
>          return 'SUBSTRING(%s,%s,%s)' % (fieldname, pos, length)
>      def PRIMARY_KEY(self,key):
>          return 'PRIMARY KEY CLUSTERED (%s)' % key
> @@ -731,7 +731,7 @@
>          return 'RAND()'
>      def NOT_NULL(self,default):
>          return 'DEFAULT %s NOT NULL', default
> -    def SUBSTRING(self,fieldname,pos,lenght):
> +    def SUBSTRING(self,fieldname,pos,length):
>          return 'SUBSTRING(%s,%s,%s)' % (fieldname, pos, length)
>      def DROP(self,table,mode):
>          return ['DROP TABLE %s %s;' % (table, mode), 'DROP GENERATOR
> GENID_%s;' % table]
> @@ -2738,8 +2738,8 @@
>      def __getslice__(self, start, stop):
>          if start < 0 or stop < start:
>              raise SyntaxError, 'not supported: %s - %s' % (start,
> stop)
> -        d = dict(field=str(self), pos=start + 1, length=stop - start)
> -        s = self._db._adapter.SUBSTRING(d)
> +        d = dict(fieldname=str(self), pos=start + 1, length=stop -
> start)
> +        s = self._db._adapter.SUBSTRING(**d)
>          return Expression(s, 'string', self._db)
>
>      def __getitem__(self, i):

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to