home / docs / sections

sections: internals:datasette-set-column-type

This data as json

id page ref title content breadcrumbs references
internals:datasette-set-column-type internals datasette-set-column-type await .set_column_type(database, resource, column, column_type, config=None) database - string The name of the database. resource - string The name of the table or view. column - string The name of the column. column_type - string The column type name to assign, e.g. "email" . config - dict, optional Optional configuration dict for the column type. Assigns a column type to a column. Overwrites any existing assignment for that column. Raises ValueError if the column type declares sqlite_types and the target column does not match one of those SQLite types. await datasette.set_column_type( "mydb", "mytable", "location", "point", config={"srid": 4326}, ) ["Internals for plugins", "Datasette class", "Column types"] []
Powered by Datasette · Queries took 4.3ms