Python sqlalchemy.dialects.mysql 模块,DOUBLE 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用sqlalchemy.dialects.mysql.DOUBLE

项目:l1dbproto    作者:lsst-dm    | 项目源码 | 文件源码
def _make_doube_type(self):
        """
        DOUBLE type is database-specific, select one based on dialect.
        """
        if self._engine.name == 'mysql':
            from sqlalchemy.dialects.mysql import DOUBLE
            return DOUBLE(asdecimal=False)
        elif self._engine.name == 'postgresql':
            from sqlalchemy.dialects.postgresql import DOUBLE_PRECISION
            return DOUBLE_PRECISION
        else:
            raise TypeError('cannot determine DOUBLE type, unexpected dialect: ' + self._engine.name)