Red Gate forums :: View topic - "Format > Case" bug
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 6
SQL Prompt 6 forum

"Format > Case" bug

Search in SQL Prompt 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
JimF



Joined: 08 Jul 2008
Posts: 20

PostPosted: Wed Jun 18, 2014 9:42 pm    Post subject: "Format > Case" bug Reply with quote

In 6.3.0.354 you started supporting CamelCase options (Great!!!), but I wanted my built-in data types to be lowercase. Not all data types are being handled correctly (in context of where they are used). For example,
Code:
Declare @TempTable table (...)
becomes
Code:
Declare @TempTable Table (...)
where the datatype "table" gets camel cased.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 244
Location: Red Gate Software

PostPosted: Thu Jun 19, 2014 11:07 am    Post subject: Reply with quote

Hi Jim,

Thanks for pointing this out - it looks like Prompt is applying the reserved word casing here as it sees "Table" as one. We'll improve the casing context awareness so it's correctly cased as a data type where appropriate. Hopefully we'll have a fix in our next beta build next week, I'll let you know when it's up.

Thanks,
Aaron.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 244
Location: Red Gate Software

PostPosted: Fri Jun 20, 2014 1:07 pm    Post subject: Reply with quote

We've just released a beta build for 6.4.0.204 which should case "Table" as a datatype in declare statements, you can download this build from here.

Please let us know if this works as expected.

Thanks,
Aaron.
Back to top
View user's profile Send private message
JimF



Joined: 08 Jul 2008
Posts: 20

PostPosted: Fri Jun 20, 2014 3:01 pm    Post subject: Reply with quote

Wow, that was quick! Yup, that fixed the casing of the "table" data type. But, I also noticed something else.

My code
Code:
Insert  Into @Committees
        ( CommitteeId,
          IsMasterAccount
        )
      Select  cgca.CommitteeId,
            cgca.IsMasterAccount
      From    dbo.Comm_GetCommitteeAccounts(@CommitteeId) As cgca


became
Code:
Insert  Into @Committees
        ( CommitteeId,
          IsMasterAccount
        )
Select  cgca.CommitteeId,
        cgca.IsMasterAccount
From    dbo.Comm_GetCommitteeAccounts(@CommitteeId) As cgca


The indenting of the Select under the Insert was removed. You used to indent the Select to align with the ")" of the column list. Was that change intentional?
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 244
Location: Red Gate Software

PostPosted: Fri Jun 20, 2014 3:10 pm    Post subject: Reply with quote

Hi Jim,

This change was intentional - it was requested here. Do you prefer the previous indentation style?

Thanks,
Aaron.
Back to top
View user's profile Send private message
JimF



Joined: 08 Jul 2008
Posts: 20

PostPosted: Fri Jun 20, 2014 3:26 pm    Post subject: Re: Reply with quote

Aaron Law wrote:
Hi Jim,

This change was intentional - it was requested here. Do you prefer the previous indentation style?

Thanks,
Aaron.


Well, I could live with the change, but what I liked about it was that it made it more obvious to me that the Select was part of the Insert and not a statement on it's own.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 244
Location: Red Gate Software

PostPosted: Fri Jun 20, 2014 3:36 pm    Post subject: Reply with quote

That makes sense.

One of the risks with changing the formatting is everyone has a different preferences Smile It looked like it was originally an oversight in the code so we hoped it'd be a safe change to make. I'll have a talk with the rest of the team, maybe we can put in another option for this or it might be best left with the old style until we start focusing on formatting later in the year.
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 244
Location: Red Gate Software

PostPosted: Mon Jun 23, 2014 3:10 pm    Post subject: Reply with quote

Hi Jim,

I've just uploaded another beta (6.4.0.206) with this as an option (off by default, so you shouldn't need to do anything to keep the old behaviour). Sorry for the inconvenience!
Back to top
View user's profile Send private message
JimF



Joined: 08 Jul 2008
Posts: 20

PostPosted: Mon Jun 23, 2014 3:31 pm    Post subject: Re: Reply with quote

Aaron Law wrote:
Hi Jim,

I've just uploaded another beta (6.4.0.206) with this as an option (off by default, so you shouldn't need to do anything to keep the old behaviour). Sorry for the inconvenience!


Hey, no problem. Formatting can be such a personal thing--as it is, years ago I used some software that formatted the code differently than SQL Prompt (don't remember the name)--I just got used to the way SQL Prompt formatted after a while...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group