Skip to content
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

Fix SQL Create Bugs #3

Open
dakkad opened this issue Dec 1, 2016 · 1 comment
Open

Fix SQL Create Bugs #3

dakkad opened this issue Dec 1, 2016 · 1 comment

Comments

@dakkad
Copy link
Contributor

dakkad commented Dec 1, 2016

The SQL create statement has some bugs in it's data type definition.

@julianharty
Copy link
Owner

I agree, the create statement in the python does have some bugs, at the time I wasn't aware of how SQLite uses dynamic typing and was able to cope regardless of the mistakes (which I learned from following some example code online at the time). I've applied what I've learned subsequently to the create statement in the Android codebase. I'd prefer SQLlite to support date & time explicitly and unambiguously, however it seems it can coerce the incoming time/date fields into three file types. A good working example is http://www.sqlitetutorial.net/sqlite-date/

Additional references/sources include the following for SQLlite:
https://www.sqlite.org/datatype3.html#affinity_name_examples
https://www.sqlite.org/lang_datefunc.html
http://www.sqlitetutorial.net/sqlite-data-types/

and the following for SQL generally
http://code.openark.org/blog/mysql/timestamp-vs-datetime-which-should-i-be-using
http://oracle.readthedocs.io/en/latest/sql/basics/style-guide.html

Thanks for the observation. I'll update the python code shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants