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

Support setting column types by guessing types on way in #27

Closed
rufuspollock opened this issue Aug 23, 2011 · 1 comment
Closed

Support setting column types by guessing types on way in #27

rufuspollock opened this issue Aug 23, 2011 · 1 comment
Assignees
Milestone

Comments

@rufuspollock
Copy link
Member

At the moment all column are strings. Want to support numbers etc. This would also address #25.

Two possible approaches (complementary) to setting types:

  1. Set type on first creation of a column by guessing from the value given (TODO: more detail on how this would work)
  2. Allow setting of column type (requires support for column metadata ...) explicitly

Item (2) is now #43. This issue is about option (1).

On way in all values are cast to column type and raise error if cannot cast correctly.

Question:

  • Do we support types other than sql types (e.g. json "type"?)

Why?

@pudo
Copy link
Contributor

pudo commented Aug 30, 2011

As of 48f30a2 this is now handled for JSON input. Adding support for CSV type guessing could also be done on a lower level, e.g. in the CSV file type importer (to keep it out of the database code). We may also want to make this conditional, e.g. with _type_guess=true and _types=int,int,float,varchar query parameters.

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

3 participants