 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
[11.0.12 Beta] - Delimiter issues |
|
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):
 |
 |
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:
 |
 |
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:
 |
 |
UPDATE `nejp8`.`conditions`
SET `to_be_deleted` = 1
WHERE `conditions_id` = a_`conditions_id` ;
$$$
|
|
|
Fri Jul 19, 2019 8:21 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
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 |
|
 |
|
|
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
|
|
|