SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[12.1.279 Pro] - BUG: Refactoring variable and delimiters

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[12.1.279 Pro] - BUG: Refactoring variable and delimiters
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [12.1.279 Pro] - BUG: Refactoring variable and delimiters Reply with quote
When trying to refactor part of the code into a stored procedure the process uses a macro called $REFACTORING_OBJ_NAME$. That macro obeys the Always Add Delimiters only half-heartedly. The schema part gets delimited, but the object part does not. Check this short video here.

It is not shown in the video but I tinkered further with it and it turned out that the object name only gets delimited if it contains a character that requires it to be delimited, eg. a space or a dash. In these cases, the delimiters are added, entering the following as the Procedure Name:
Code:

part1.part2 part3 becomes [part1].[part2 part3]
part1.part2-part3 becomes [part1].[part2-part3]


If I add a period, the whole object chain gets shifted out to the left, entering the following as the Procedure Name:
Code:

part1.part2 becomes [part1].part2
part1.part2.part3 becomes [part2].part3
etc.


If I want to add a period to the name, I have to add the delimiter to the Procedure Name manually, so entering this works properly:
Code:

part1.[part2.part3]


However, manually adding the delimiters to a name that would otherwise not require it does not work at all, the delimiters get stripped, yielding funny results like:
Code:

part1.[part2] becomes [part1].part2

Fri Oct 07, 2022 9:02 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
I'm afraid the $REFACTORING...$ macros haven't been designed to follow the Delimiters settings. It could be an oversight, I'm not sure.
Mon Oct 10, 2022 10:30 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
That explains it then. Thanks for the info!
Tue Oct 11, 2022 7:24 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
I've been told the refactoring macros were introduced before the global option for controlling delimiters became available, and indeed, it's an oversight they didn't get updated at that time. I submitted a ticket to get that rectified.
Tue Oct 11, 2022 8:43 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
Thank you very much!
Wed Oct 12, 2022 8:50 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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
Design by Freestyle XL / Flowers Online.