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

Decide what to do about /-/inspect #465

Closed
simonw opened this issue May 11, 2019 · 4 comments
Closed

Decide what to do about /-/inspect #465

simonw opened this issue May 11, 2019 · 4 comments

Comments

@simonw
Copy link
Owner

simonw commented May 11, 2019

It's not clear to me what this endpoint should do now as a result of #419 - it's still useful to be able to introspect databases for tools like datasette-registry, but since we aren't pre-calculating introspection data any more I need to rethink the approach.

For one thing, this endpoint may need to be paginated. Or maybe it should be split up into separate endpoints for each connected database? Those should probably be paginated too seeing as fivethirtyeight has 400+ tables.

@simonw
Copy link
Owner Author

simonw commented May 11, 2019

I split this out from #462

@simonw
Copy link
Owner Author

simonw commented May 16, 2019

The main use-case for this endpoint now is going to be Datasette Registry (which really needs some more love).

That tool needs to be able to query a Datasette and find out:

  • What tables are available
  • What their columns are
  • Ideally, their row counts

A single /-/inspect call is no good here because with Datasette Library #417 I'm going to be encouraging MUCH larger Datasette instances, potentially with hundreds of attached databases and thousands of attached tables. So pagination will be essential.

Maybe a smarter approach will be the older idea of having a separate inspect for each database (and maybe each table):

  • /mydatabase/-/inspect
  • /mydatabase/mytable/-/inspect

Either way, I'm going to decouple this from milestone 0.28.

simonw added a commit that referenced this issue May 16, 2019
Refs #462

/-/inspect.json may return in some shape in #465
simonw added a commit that referenced this issue May 16, 2019
@simonw
Copy link
Owner Author

simonw commented Jun 28, 2019

Next step:

  • build /database/-/inspect which shows tables, columns, column types and foreign keys

It won't show table counts. Or maybe it will include them optionally but only for -I databases, in a special area of the JSON reserved for immutable-only inspect details.

@simonw
Copy link
Owner Author

simonw commented Jun 28, 2019

I'm closing this because #531 counts as a decision.

@simonw simonw closed this as completed Jun 28, 2019
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