 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[12.1.279 Pro] - BUG: Refactoring variable and delimiters |
|
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:
 |
 |
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:
 |
 |
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:
 |
 |
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:
 |
 |
part1.[part2] becomes [part1].part2
|
|
|
Fri Oct 07, 2022 9:02 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
That explains it then. Thanks for the info!
|
|
Tue Oct 11, 2022 7:24 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
|
|
Thank you very much!
|
|
Wed Oct 12, 2022 8:50 am |
|
 |
|
|
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
|
|
|