models.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:stream2segment 作者: rizac 项目源码 文件源码
def orientation_code(cls):  # @NoSelf
        '''returns the sql expression returning the third letter of the channel field,
        or NULL if the latter has not length 3'''
        # return an sql expression matching the last char or None if not three letter channel
        return substr(cls.channel, 3, 1)
        #return case([(func.length(cls.channel) == 3, func.substr(cls.channel, 3, 1))], else_=null())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号