query.py 文件源码

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

项目:marvin 作者: sdss 项目源码 文件源码
def _adjust_defaults(self):
        ''' Adjust the default parameters to include necessary parameters

        For any query involving DAP DB, always return the spaxel index
        TODO: change this to spaxel x and y

        TODO: change this entirely

        '''
        dapschema = ['dapdb' in c.class_.__table__.schema for c in self.queryparams]
        if any(dapschema):
            dapcols = ['spaxelprop.x', 'spaxelprop.y', 'bintype.name', 'template.name']
            self.defaultparams.extend(dapcols)
            self.params.extend(dapcols)
            self.params = list(OrderedDict.fromkeys(self.params))
            self._create_query_modelclasses()
            # qpdap = self.marvinform._param_form_lookup.mapToColumn(dapcols)
            # self.queryparams.extend(qpdap)
            # self.queryparams_order.extend([q.key for q in qpdap])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号