当前位置: 首页>>代码示例>>Python>>正文


Python DBSession.execute方法代码示例

本文整理汇总了Python中tribal.model.DBSession.execute方法的典型用法代码示例。如果您正苦于以下问题:Python DBSession.execute方法的具体用法?Python DBSession.execute怎么用?Python DBSession.execute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tribal.model.DBSession的用法示例。


在下文中一共展示了DBSession.execute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _getSystemNo

# 需要导入模块: from tribal.model import DBSession [as 别名]
# 或者: from tribal.model.DBSession import execute [as 别名]
        def _getSystemNo():
            s = Sequence( 'rp_main_form_seq' )
            s.create( DBSession.bind, checkfirst = True )    # if the seq is existed ,don't create again
            c = DBSession.execute( s )
            prefix = 'OTHER'
            for g in request.identity["user"].groups:
                for profile in g.prepress_profiles:
                    if profile.region_id :
                        prefix = profile.region.code
                        break
#             return "RP%s%.6d" % ( prefix, c )
            return "RP%s%s" % ( prefix, c )
开发者ID:LamCiuLoeng,项目名称:internal,代码行数:14,代码来源:prepress.py

示例2: update_blank_awb_dn

# 需要导入模块: from tribal.model import DBSession [as 别名]
# 或者: from tribal.model.DBSession import execute [as 别名]
 def update_blank_awb_dn(cls, dn_no, awb_no):
     if awb_no and dn_no:
         sql = '''
             update mglobal_erp_dnd set awb_no='%s' where dn_no='%s'
         ''' % (awb_no, dn_no)
         DBSession.execute(sql)
开发者ID:LamCiuLoeng,项目名称:internal,代码行数:8,代码来源:mglobalpack.py

示例3: update_in_mp_order

# 需要导入模块: from tribal.model import DBSession [as 别名]
# 或者: from tribal.model.DBSession import execute [as 别名]
 def update_in_mp_order(cls, cust_po_no_list):
     if cust_po_no_list:
         sql = 'update mglobal_erp_so set in_mp_order=true where (%s) and (in_mp_order=false or in_mp_order is null)' % 'cust_po_no=\'%s\'' % '\' or cust_po_no=\''.join(cust_po_no_list)
         DBSession.execute(sql)
开发者ID:LamCiuLoeng,项目名称:internal,代码行数:6,代码来源:mglobalpack.py


注:本文中的tribal.model.DBSession.execute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。