SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[12.0.191 Pro] - Issues with auto-commenting auto-generated

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[12.0.191 Pro] - Issues with auto-commenting auto-generated
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post [12.0.191 Pro] - Issues with auto-commenting auto-generated Reply with quote
The auto-generated/identity columns are usually the first column in a table (or very near the top) hence generating something like this below is not an issue:
Code:

INSERT INTO "stage"."usage_end"
(
    -- "h_id" -- this column value is auto-generated
    "external_id",
    "name",
    "code",
)


It doesn't even matter when it's somewhere in the middle:
Code:

INSERT INTO "stage"."usage_end"
(
    "external_id",
    -- "h_id" -- this column value is auto-generated
    "name",
    "code",
)


However, having them as the last column
Code:

INSERT INTO "stage"."usage_end"
(
    "external_id",
    "name",
    "code",
    -- "h_id" -- this column value is auto-generated
)

causes SA to generate invalid code.

I know this might be considered as an edge case, and I don't really expect it to be fixed in the foreseeable future (or at all), I'm just putting it here for you to be aware of it (in case you weren't already).
Wed Jan 26, 2022 5:54 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
Thank you. This is an issue with the internal function which applies its logic to a single column, before adding column specific line to the code, if the value is auto-generated, prefix it with -- comments. I'm submitting it as a bug, but I'm afraid that fixing it wouldn't be a trivial quick thing.
Wed Jan 26, 2022 9:58 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2102

Post Reply with quote
If you have your hands full with other/more important things, I'd say don't bother with it (unless a constant stream of developers keeps banging on the door demanding a fix). Most users will likely never run into this.
Wed Jan 26, 2022 1:29 pm 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.