I'm losing patience with sqlite. I've been working on Spyce examples using postgresql, but now that I'm getting close to releasing Spyce 2.1, I figured I'd better convert the examples to use sqlite since that's such a no-brainer to set up.
It has been a frustrating experience.
Weird-assness I've run into includes
- "int" is not the same as "integer" (always use the latter to avoid unpleasant surprises)
- It's impossible to get useful information about column DEFAULTs programmatically
- There's a bug in the parsing of some three-way joins
And I didn't think I was doing anything very complicated! My examples have three tables at most!
Really my overall impression is one of a "0.9" product at best. I'm amazed that so many people appear to use this festering pile of gotchas in production.
Comments
And there's no DROP/RENAME COLUMN, no CREATE/DROP DATABASE, no date functions, no RIGHT JOIN, no nested JOINS, and *very* confusing differences between quoting with '', "", and []. Also, schema changes are bound to the database connection in which they are performed, which hampers database connection pooling.
Just a few from scrounging my code. ;)
You're right, of course - SQLite has gotchas. Robert has pointed out a bunch more. I would hate to write an application that only targeted SQLite, as you would have to program in application code a lot of functionality that should be provided by the database.
That being said, I haven't seen a good alternative for administration-less embedded databases yet.
pragma table_info('tablename')
which you can call use like any other SQL query.
Really this is all rather churlish. We're talking about an under 200K download here. I'm amazed that sqlite can do as much as it does.
I'm okay with features that are legitimately missing and documented as such. It's features that should work, but don't, that piss me off. Especially in something that holds my data.