mirror of
https://github.com/simonw/datasette.git
synced 2026-06-06 09:07:00 +02:00
Implements the column types feature that lets Datasette and plugins annotate columns with semantic types beyond SQLite storage types (e.g. markdown, email, url, json, file, point). This enables type-appropriate rendering, validation, form widgets, and API behavior. Key changes: - New `column_types` internal DB table for storing assignments - `ColumnType` dataclass in datasette/column_types.py with render_cell, validate, and transform_value methods - `register_column_types` plugin hook for registering types - Built-in url, email, and json column types - Datasette API methods: get/set/remove_column_type(s), get_column_type_class - Config loading from datasette.json `column_types` table config key - `column_types` extra on the table JSON endpoint - Column type info in display_columns extra - Column type render_cell gets priority in rendering pipeline - column_type/column_type_config args added to render_cell hookspec - Write-path validation on insert and update https://claude.ai/code/session_01SvPEPqHgURTWESRp28pTC3 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| actions_sql.py | ||
| asgi.py | ||
| baseconv.py | ||
| check_callable.py | ||
| internal_db.py | ||
| multipart.py | ||
| permissions.py | ||
| shutil_backport.py | ||
| sqlite.py | ||
| testing.py | ||