{"ok": true, "next": null, "rows": [{"id": "plugin_hooks:plugin-hook-table-actions", "page": "plugin_hooks", "ref": "plugin-hook-table-actions", "title": "table_actions(datasette, actor, database, table, request)", "content": "datasette  -  Datasette class \n                         \n                             You can use this to access plugin configuration options via  datasette.plugin_config(your_plugin_name) , or to execute SQL queries. \n                         \n                     \n                     \n                         actor  - dictionary or None \n                         \n                             The currently authenticated  actor . \n                         \n                     \n                     \n                         database  - string \n                         \n                             The name of the database. \n                         \n                     \n                     \n                         table  - string \n                         \n                             The name of the table. \n                         \n                     \n                     \n                         request  -  Request object  or None \n                         \n                             The current HTTP request. This can be  None  if the request object is not available. \n                         \n                     \n                 \n                 This example adds a new table action if the signed in user is  \"root\" : \n                 from datasette import hookimpl\n\n\n@hookimpl\ndef table_actions(datasette, actor, database, table):\n    if actor and actor.get(\"id\") == \"root\":\n        return [\n            {\n                \"href\": datasette.urls.path(\n                    \"/-/edit-schema/{}/{}\".format(\n                        database, table\n                    )\n                ),\n                \"label\": \"Edit schema for this table\",\n                \"description\": \"Add, remove, rename or alter columns for this table.\",\n            }\n        ] \n                 Example:  datasette-graphql", "breadcrumbs": "[\"Plugin hooks\", \"Action hooks\"]", "references": "[{\"href\": \"https://datasette.io/plugins/datasette-graphql\", \"label\": \"datasette-graphql\"}]"}], "truncated": false}