本文整理汇总了Python中DataManager.DataManager.getRows方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.getRows方法的具体用法?Python DataManager.getRows怎么用?Python DataManager.getRows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.getRows方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import getRows [as 别名]
def __init__(self, code ):
hobby_row = DataManager.getRow( "SELECT * FROM Hobby WHERE HobbyCode=?", [code] )
self.code = code
self.expense = hobby_row['Expense']
self.skills = DataManager.getRows( "SELECT * FROM HobbySkill WHERE HobbyCode=?", [code] )
self.needs = DataManager.getRows( "SELECT * FROM HobbyNeed WHERE HobbyCode=?", [code] )
示例2: SUM
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import getRows [as 别名]
import sqlite3
import csv
import json
from DataManager import DataManager
csvOut = []
#SKILL TITLE ROW
csvOut.append( [ 'SKILLS' ] )
#SKILL TABLE HEADER ROW
csvOut.append( [ 'Name', '# player points', '# jobs required for', 'job names', \
'Total job point requirement', '# partners required for', 'Total partner point requirement' ] )
skill_rows = DataManager.getRows( "SELECT * FROM Skill ORDER BY Name" )
for skill in skill_rows:
row = []
row.append(skill['Name'])
skill_code = skill['SkillCode']
player_usage = DataManager.getRow( "SELECT SUM(Value) AS ValSum FROM PlayerSkill WHERE SkillCode=?", [skill_code] )
row.append(player_usage['ValSum'])
job_usage = DataManager.getRow( "SELECT COUNT(*) AS Cnt, SUM(Value) AS ValSum FROM JobSkillRequirement WHERE SkillCode=?", [skill_code] )
jobs = DataManager.getRows( """
SELECT
Job.Name
FROM