-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the type for a column #386
Comments
Yeah, this is a problem. If the adapter returns a timestamp value we have affordances to convert it into a I tried registering converters and casting the column, but couldn't get it to work. Not sure how to do it. The apsw description for the column type always comes back as |
Is your feature request related to a problem? Please describe.
When requesting data from a JSON backend, sometimes a backend returns time as seconds since the epoch. In this case, it would be really nice to interpret it as a date.
Describe the solution you'd like
Since the data is being parsed and injected into a sqlite cache anyway, I attempted to use syntax like
DATETIME(somefield, 'unixepoch') as fieldName
and it does indeed transform the data, but not in a way that is later treated as a timestamp.Describe alternatives you've considered
I also considered using the sqlite CAST primitive, but that does not work to dates. I also considered forcing the data from the source to be in an ISO timestamp in the hope the underlying engine would magically just work - but I do not always have access to the data source and a local solution seems more interesting.
The text was updated successfully, but these errors were encountered: