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

Check incoming column types on various write APIs #1910

Open
simonw opened this issue Nov 29, 2022 · 0 comments
Open

Check incoming column types on various write APIs #1910

simonw opened this issue Nov 29, 2022 · 0 comments

Comments

@simonw
Copy link
Owner

simonw commented Nov 29, 2022

I do think this needs type checking - I just tried and you really can send a string to an integer column and have it work, which feels bad.

Originally posted by @simonw in #1863 (comment)

@simonw simonw added this to the Datasette 1.0a1 milestone Nov 29, 2022
tylermckenz1 added a commit to TimothyOLeary/datasette that referenced this issue Apr 24, 2024
Potential fix in datasette/views/database.py.

Issue simonw#1910 refers to columns having no type checking and upon analysis it sets columns with no types as a "text" string. Implemented a feature that checks if the instance variables within that column are either Integers or Floats and sets them accordingly. If they are not it is then set as a "text" string instead as originally intended.

simonw#1910 was not even an issue in the first place, I just classified Integers and Floats as themselves instead of everything being "text" strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant