home / docs / sections

sections: internals:datasette-get-column-type

This data as json

id page ref title content breadcrumbs references
internals:datasette-get-column-type internals datasette-get-column-type await .get_column_type(database, resource, column) database - string The name of the database. resource - string The name of the table or view. column - string The name of the column. Returns a ColumnType subclass instance with .config populated for the specified column, or None if no column type is assigned. ct = await datasette.get_column_type( "mydb", "mytable", "email_col" ) if ct: print(ct.name) # "email" print(ct.config) # None or {...} ["Internals for plugins", "Datasette class", "Column types"] []
Powered by Datasette · Queries took 4.611ms