Closed krab closed 1 year ago
Column order doesn't mean anything really as far as I know. It's random and you should never rely on it.
What is the problem you're solving?
What is the problem you're solving?
No problems at all. Just every single ORM (based on structs->DB) for Go makes ID columns first just it. This is the first time I see random.
What is the problem you're solving?
No problems at all. Just every single ORM (based on structs->DB) for Go makes ID columns first just it. This is the first time I see random.
What I meant by saying that the column order is random is that the list of columns is unordered in general and can't be relied upon. But I guess in some DBs and in some cases the insertion order would match the order the columns appear in selects.
It shouldn't really be a problem to insert id first. I'm just not seeing the benefit of potentially breaking someone's code with this change.
Currently, it's always last https://i.imgur.com/2NmEnSO.png
And nim code looks like: