Skip to content

Conversation

russss
Copy link
Contributor

@russss russss commented Mar 31, 2019

This PR does two things:

  • Adds the sqlite column type for each column to the inspected table info.
  • Stops binary columns from being rendered to HTML, unless a plugin handles it.

There's a bit more detail in the changeset descriptions.

These changes are intended as a precursor to a plugin which adds first-class support for Spatialite geographic primitives, and perhaps more useful geo-stuff.

russss added 3 commits March 31, 2019 17:09
This is a huge pain to update when changing the inspect output (which, I
admit, is something only I seem to do). It's also tricky to see what has
caused a failure, even with pytest's diffing.

If we feel this is needed, we should probably test whether specific keys
exist, rather than the equality of the entire structure.
This lets datasette or plugins render data more appropriately based on
column type.

I decided not to try and replace the existing "columns" key here, as it
might affect existing plugins.

The column type is lowercased for consistency because sqlite's schema is
case insensitive/case preserving.
@russss
Copy link
Contributor Author

russss commented Apr 29, 2019

This is pretty conflicty because I forgot how to use git fetch. If you're interested in merging this I'll rewrite it against an actual modern checkout...

@russss
Copy link
Contributor Author

russss commented Apr 29, 2019

Actually no, I ended up not using the inspected column types in my plugin, and the binary column issue can be solved a lot more simply, so I'll close this.

@russss russss closed this Apr 29, 2019
@russss russss deleted the inspect_column_types branch April 29, 2019 18:30
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

Successfully merging this pull request may close these issues.

1 participant