Moving to SQLite
Most of the known implementation inconveniences associated with SQLite are addressed in the documentation for the Mono.Data.SqliteClient
class. The issues surrounding managing DateTime
values might get more than inconvenient.
The System.Data.SQLite
team addresses the same issue. In a forum post Robert writes:
The only way I have any control over the formatting is when using a parameterized query. When you pass a
datetime
as a parameter, I format it as a string in an ISO8601 format and set the parameter’s value in the engine to that resulting formatted string. It’s never given to the engine as adatetime
; it’s presented as a string to the engine. I just have the chance to control the formatting through the parameter mechanism.
“Date and Time Functions” documentation at sqlite.org goes into more detail about how SQLite handles ‘date strings.’ I look forward to the day when these functions are no longer considered “experimental.”
My strange comment of the day: because SQLite is so text based—in fact it is UTF-8- and Unicode-based, it feels like an exotic binary storage format for XML data.