sections: internals:datasette-get-column-types
This data as json
| id | page | ref | title | content | breadcrumbs | references |
|---|---|---|---|---|---|---|
| internals:datasette-get-column-types | internals | datasette-get-column-types | await .get_column_types(database, resource) | database - string The name of the database. resource - string The name of the table or view. Returns a dictionary mapping column names to ColumnType subclass instances (with .config populated) for all columns that have assigned types on the given resource. ct_map = await datasette.get_column_types("mydb", "mytable") for col_name, ct in ct_map.items(): print(col_name, ct.name, ct.config) | ["Internals for plugins", "Datasette class", "Column types"] | [] |