def convert_type(self, type):
<EOL>mapping = {<EOL>'<STR_LIT>': sa.Text,<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': sa.Boolean,<EOL>'<STR_LIT:date>': sa.Date,<EOL>'<STR_LIT>': sa.DateTime,<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': None,<EOL>'<STR_LIT>': sa.Integer,<EOL>'<STR_LIT>': sa.Float,<EOL>'<STR_LIT:object>': None,<EOL>'<STR_LIT:string>': sa.Text,<EOL>'<STR_LIT:time>': sa.Time,<EOL>'<STR_LIT>': sa.Integer,<EOL>'<STR_LIT>': None,<EOL>}<EOL>if self.__dialect == '<STR_LIT>':<EOL><INDENT>mapping.update({<EOL>'<STR_LIT>': JSONB,<EOL>'<STR_LIT>': JSONB,<EOL>'<STR_LIT>': sa.Numeric,<EOL>'<STR_LIT:object>': JSONB,<EOL>})<EOL><DEDENT>if type not in mapping:<EOL><INDENT>message = '<STR_LIT>'<EOL>raise tableschema.exceptions.StorageError(message % type)<EOL><DEDENT>return mapping[type]<EOL>
Convert type to SQL