Posted on: 2012-11-01 17:17:39.000So, now we have the final U in CRUD done, and I can finally edit posts. YOU can't edit comments yet, but that's coming soon, probably tomorrow.
That's fun. EDITING ROCKS! It's also a really neat macro that makes it pretty easy to do SQL update statements.
Here's another neat thing: Basically, I use the exact same statement to create and update a post:
(update-record "Posts" Id PosterId PostDate PostSubject PostContent) ; It's the U in CRUD!
(create-record "Posts" Id PosterId PostDate PostSubject PostContent) ; It's the C in CRUD!
There's a lot of stuff going on behind the scenes to translate the above into two very different SQL statements. Basically the Id in the first is to CHECK for Id's value, and in the second statement it is to SET Id to that value. I like the symmetry,