|
|
|
|
|
by MobiusHorizons
799 days ago
|
|
It is a fairly low level abstraction, but one that does not require a verbose api. There is nothing error prone or hackish about what you have written, it will work for all inputs, it is just low level. You are just used to having other people write this code for you and give you a library. With newer versions of SQLite you could also write CAST(strftime(“%Y”, game_date)) as INTEGER Which is somewhat higher level and less easily mistyped |
|
Still, having that all over a query looks ugly. SQL is can be unreadable enough as it is without all the joins/table renaming.
I just want something more readable like EXTRACT(year from date), like you can in Postgres et al.
Would also be nice if there was a native timestamp like there is in, pretty much every other database.
I'm sensitive to "feature creep" but this doesn't seem like too big of an ask.