-
I'm playing around with the the swift-structured-query using GRDB statements I have in my existing code base. For the most part, all is fairly straightforward, but one of my statements is giving me trouble. I am trying to achieve the following insert + select and I have not come up with anything that does not lead to compile error. Here, I want to insert a new row in a "tags" table that has a primary key ID column, a displayName text column, and an ordering integer column which records the ordering of the tags by a user. I would like new tags to be ordered at the bottom until changed, so I create new tags in GRDB with something like the following ("newTag" is the name of the new tag):
I've gotten other INSERT operations, usually with a 'draft', to work fine, but here injecting the "newTag" value along with a "count(*)" hass got me stumped. Some test cases led me to investigate using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well, of course starting clean and trying again, and I hit on the solution:
|
Beta Was this translation helpful? Give feedback.
Well, of course starting clean and trying again, and I hit on the solution: