Hacker News new | ask | show | jobs
by ncruces 17 days ago
The downside is that you loose the place to store the metadata that a column is supposed to store a date.

Which is why I prefer not to use them.

1 comments

A comment will do more than a nonsensical type which is not enforced: it won’t have the wrong affinity, it will spell out what the concrete type is, and there’s no limit to what it can specify.

Domain types would be the best fix, but I do not think legacy tables are the second best.

A comment is not something I can get programmatically through `sqlite3_column_decltype` or `sqlite3_table_column_metadata`.

I can use either API to trigger bool and time handling in my Go driver.

https://github.com/ncruces/go-sqlite3/blob/main/driver/drive...