本文整理汇总了Python中Session.Session.uploaded方法的典型用法代码示例。如果您正苦于以下问题:Python Session.uploaded方法的具体用法?Python Session.uploaded怎么用?Python Session.uploaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Session.Session
的用法示例。
在下文中一共展示了Session.uploaded方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: find
# 需要导入模块: from Session import Session [as 别名]
# 或者: from Session.Session import uploaded [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
示例2: findBySourceFileAddress
# 需要导入模块: from Session import Session [as 别名]
# 或者: from Session.Session import uploaded [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