[TxMt] sql bundle bug - create view

Alex Podaras apod at cursed.gr
Sat Jan 19 00:09:56 UTC 2008


Hello Mathew,

You can find the command by opening your Bundle Editor (Bundles>Bundle  
Editor>Show Bundle Editor or by ⌃⌥⌘B)
and navigate to SQL>Database Browser there just change the command

from:
db_browser.rb
to:
db_browser.rb --rows 50

This should work.

Regards,
Alex

On Jan 19, 2008, at 12:12 AM, mathew wrote:

> thank you alex,
> but i don't actually understand how to do that,
> i'm not familiar with how the bundles work
>
> can you please explain to me what you mean?
>
> thank you for your help
>
> mathew
>
> On 19/01/2008, at 2:32 AM, Alex Podaras wrote:
>
>> 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