Brent Dax (brentdax) wrote,
Brent Dax
brentdax

  • Mood:
  • Music:

Death to reserved words

Knightley has a feature called "groups". This has proven to be a huge liability.

You see, SQL (the language used to talk to databases) has a feature called GROUP BY. I won't bother explaining what it does, but there's basically only one place in SQL where you could possibly use the word "GROUP" (or "group" or "GrOUp", since SQL is case-insensitive) to access that feature.

Naturally, having a feature called "groups", I want to be able to call things in my database "group". Unfortunately, for some insane reason, SQL uses reserved words--meaning that using "GROUP" in any context, even one that clearly has nothing to do with GROUP BY, is verboten. There are quoting mechanisms for getting around this, but they vary from database to database, so the library I'm using doesn't try to support them.

And now it's having trouble renaming a column named 'group' to 'groupid' for some reason...

Ugh.
Tags: hacking, knightley
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments