本文整理匯總了Python中bank.Bank.accepted方法的典型用法代碼示例。如果您正苦於以下問題:Python Bank.accepted方法的具體用法?Python Bank.accepted怎麽用?Python Bank.accepted使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bank.Bank
的用法示例。
在下文中一共展示了Bank.accepted方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getBankList
# 需要導入模塊: from bank import Bank [as 別名]
# 或者: from bank.Bank import accepted [as 別名]
def getBankList(whereDict, city="all"):
conn = getConnection();
c = conn.cursor();
where = buildWhereClause(whereDict);
if city and city != "all":
where += " and ct_name = '%s'" % city;
c.execute("SELECT * FROM " + BankTable.TABLE_NAME
+ " LEFT OUTER JOIN "
+ " (SELECT _id AS ct_id, name AS ct_name FROM city) "
+ " ON ct_id == " + BankTable.COL_CITY_ID + " "
+ where + "ORDER BY _id DESC", list(whereDict.viewvalues()))
conn.commit();
banks = [];
for row in c.fetchall():
bank = Bank();
bank.name = row[BankTable.COL_NAME];
bank.title = row[BankTable.COL_TITLE];
bank.fetchTime = row[BankTable.COL_FETCH_TIME];
bank.accepted = row[BankTable.COL_ACCEPTED];
bank.url = row[BankTable.COL_URL];
bank.id = row[BankTable.COL_ID];
city = row["ct_name"];
if city:
bank.city = city;
banks.append(bank);
return banks;