當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。