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


Python Session.startDate方法代码示例

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


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

示例1: testInsert

# 需要导入模块: from Session import Session [as 别名]
# 或者: from Session.Session import startDate [as 别名]
 def testInsert(self):
     sdao = SessionDAO()
     session = Session()
     session.startDate = '2009-10-10' 
     session.lastUpdate = '2009-10-10' 
     session.source.id = self.sourceId
     session.file.id = self.fileId
     session.address.id = self.addressId
     sid = sdao.insert(session)
     assert sid != -1, 'error inserting session'
开发者ID:tassia,项目名称:DonkeySurvey,代码行数:12,代码来源:SessionTestCase.py

示例2: find

# 需要导入模块: from Session import Session [as 别名]
# 或者: from Session.Session import startDate [as 别名]
 def find(self, id):
     self.cursor.execute("""SELECT * FROM """+self.tablename+""" WHERE id = %s""", (id,))
     rs = self.cursor.fetchall()
     session = Session()
     if not rs:
         return None
     for row in rs:
         session.id = row[0]
         session.startDate = row[1] 
         session.lastUpdate = row[2] 
         session.downloaded = row[3] 
         session.uploaded = row[4] 
         session.source.id = row[5] 
         session.file.id = row[6] 
         session.address.id = row[7] 
         session.kind = row[8] 
     return session 
开发者ID:tassia,项目名称:DonkeySurvey,代码行数:19,代码来源:SessionDAO.py

示例3: findBySourceFileAddress

# 需要导入模块: from Session import Session [as 别名]
# 或者: from Session.Session import startDate [as 别名]
    def findBySourceFileAddress(self, sourceId, fileId, addressId):
        query = "SELECT * FROM %s WHERE source_id = %s and file_id = %s and address_id = %s " % (self.tablename, sourceId, fileId, addressId)
	logging.debug(query)
	self.cursor.execute(query)
        rs = self.cursor.fetchall()
        if not rs:
            return None
        session = Session()
        for row in rs:
            session.id = row[0]
            session.startDate = row[1] 
            session.lastUpdate = row[2] 
            session.downloaded = row[3] 
            session.uploaded = row[4] 
            session.source.id = row[5] 
            session.file.id = row[6] 
            session.address.id = row[7] 
            session.kind = row[8] 
        return session 
开发者ID:tassia,项目名称:DonkeySurvey,代码行数:21,代码来源:SessionDAO.py


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