[TxMt] sql bundle bug - create view

Alex Podaras apod at cursed.gr
Fri Jan 18 15:32:25 UTC 2008


Hello Mathew,

I haven' t tried the following but it should work,
try changing the command for Database Browser to something like:

db_browser.rb --rows 50

this will probably solve your problem.

Regards,
Alex

On Jan 18, 2008, at 3:55 PM, mathew wrote:

> Hello,
>
> when i use the sql bundle to create a mysql view
> such as the following:
>
> CREATE VIEW cp_qry_offset AS
> select
> 		O.offset_id, 		
> 		O.account_id, 		
>      		O.calculation_id
> 		O.quantity, 					
> 		O.type,				
>
> 		T.description as type_description
> 		
> from 	cp_offset O
>
> join 		cp_offset_type T
> on 		O.type = T.type_id
>
>
> for reasons unknown to me, but suspiciously related to the sql  
> bundle's
> habit of returning 10 rows of a
> select at a time in the database browser,
> it seems the bundle is appending:
>
> 		limit 0,10
>
> to the view definition.
>
> which means i then have to edit the view with another
> tool to remove this limit before it will work
>
> do you know why that is happening?
>
> i'm guessing its related to this in db_browser.rb in the sql bundle,
> but i don't know how to change it
>
>  if not query=~ /\bLIMIT\b/i and run_query =~ /\s*SELECT/i
>    run_query << ' LIMIT %d OFFSET %d' % [@page_size, offset]
>    @limited = false
>  end
>
> can anyone help?
>
> thanks
> mathew
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list