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

Render plugin mechanism needs error and truncated fields #2130

Closed
simonw opened this issue Aug 7, 2023 · 2 comments
Closed

Render plugin mechanism needs error and truncated fields #2130

simonw opened this issue Aug 7, 2023 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented Aug 7, 2023

While working on:

It became clear that the render callback function documented here: https://docs.datasette.io/en/0.64.3/plugin_hooks.html#register-output-renderer-datasette

Needs to grow the ability to be told if an error occurred (an error string) and if the results were truncated (a truncated boolean).

@simonw
Copy link
Owner Author

simonw commented Aug 7, 2023

Main place the code needs updating is here:

result = call_with_supported_arguments(
self.ds.renderers[_format][0],
datasette=self.ds,
columns=data.get("columns") or [],
rows=data.get("rows") or [],
sql=data.get("query", {}).get("sql", None),
query_name=data.get("query_name"),
database=database,
table=data.get("table"),
request=request,

Plus the documentation.

@simonw
Copy link
Owner Author

simonw commented Aug 8, 2023

simonw added a commit that referenced this issue Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant