SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[11.0.12 Beta] - Delimiter issues

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[11.0.12 Beta] - Delimiter issues
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2108

Post [11.0.12 Beta] - Delimiter issues Reply with quote
Auto Complete feature Always Add Delimiters seems to interfere with macros, namely when trying to pre/postfix names provided by the macro. I've got Always Add Delimiters set to Always add apostrophes `` in MariaDB. I also have a Code Generator item that adds the prefix a_ to the column names retrieved by the $COLUMNS$ macro (the code is 'stolen' from built-in code generator templates):

Code:

UPDATE `$OBJECT(ins_schema, table)$`.`$OBJECT(ins_object, table)$`
SET $COLUMNS(vertical,updatable)$ = a_$COLUMNS(vertical,updatable)$
WHERE "AND "$COLUMNS(vertical,keys)$" = a_"$COLUMNS(vertical,keys)$ ;


The issue is most likely caused by the combination of Always Add Delimiter and this part of the code:
Code:

WHERE "AND "$COLUMNS(vertical,keys)$" = a_"$COLUMNS(vertical,keys)$


It seems that adding the delimiters precedes the processing of the " = a_" part and as a result, the generator yields this:
Code:

UPDATE `nejp8`.`conditions`
SET `to_be_deleted` = 1
WHERE  `conditions_id` = a_`conditions_id` ;
$$$

Fri Jul 19, 2019 8:21 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
I reproduced that too. It appears that the names are delimited before the macro expansion and that is a general issue not specific to MariaDB. I will submit a bug report for this one.
Fri Jul 19, 2019 10:33 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.