issue_comments: 1652746185
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/2112#issuecomment-1652746185 | https://api.github.com/repos/simonw/datasette/issues/2112 | 1652746185 | IC_kwDOBm6k_c5igufJ | 9599 | 2023-07-27T00:46:37Z | 2023-07-27T00:46:37Z | OWNER | Got Claude to generate this code: ```python from dataclasses import dataclass, field @dataclass class QueryContext: database: str = field(metadata={"help": "The name of the database being queried"}) query: dict = field(metadata={"help": "The SQL query object containing the `sql` string"}) canned_query: str = field(metadata={"help": "The name of the canned query if this is a canned query"}) private: bool = field(metadata={"help": "Boolean indicating if this is a private database"}) urls: dict = field(metadata={"help": "Object containing URL helpers like `database()`"}) canned_write: bool = field(metadata={"help": "Boolean indicating if this canned query allows writes"}) db_is_immutable: bool = field(metadata={"help": "Boolean indicating if this database is immutable"}) error: str = field(metadata={"help": "Any query error message"}) hide_sql: bool = field(metadata={"help": "Boolean indicating if the SQL should be hidden"}) show_hide_link: str = field(metadata={"help": "The URL to toggle showing/hiding the SQL"}) show_hide_text: str = field(metadata={"help": "The text for the show/hide SQL link"}) editable: bool = field(metadata={"help": "Boolean indicating if the SQL can be edited"}) allow_execute_sql: bool = field(metadata={"help": "Boolean indicating if custom SQL can be executed"}) tables: list = field(metadata={"help": "List of table objects in the database"}) named_parameter_values: dict = field(metadata={"help": "Dictionary of parameter names/values"}) csrftoken: callable = field(metadata={"help": "Function to generate a CSRF token"}) edit_sql_url: str = field(metadata={"help": "URL to edit the SQL for a canned query"}) display_rows: list = field(metadata={"help": "List of result rows to display"}) columns: list = field(metadata={"help": "List of column names"}) renderers: dict = field(metadata={"help": "Dictionary of renderer name to URL"}) url_csv: str = field(metadata={"help": "URL for CSV export"}) metadata: dict = field(metadata={"help": "Metadata about the query/database"}) ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1822938661 |