本文整理汇总了Python中pystratum_mysql.StaticDataLayer.StaticDataLayer.execute_sp_rows方法的典型用法代码示例。如果您正苦于以下问题:Python StaticDataLayer.execute_sp_rows方法的具体用法?Python StaticDataLayer.execute_sp_rows怎么用?Python StaticDataLayer.execute_sp_rows使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pystratum_mysql.StaticDataLayer.StaticDataLayer
的用法示例。
在下文中一共展示了StaticDataLayer.execute_sp_rows方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enk_front_schedule_get_all
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_front_schedule_get_all():
"""
Selects all schedules.
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_schedule_get_all()")
示例2: tst_test_rows_with_key1_with_lob
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def tst_test_rows_with_key1_with_lob(p_count, p_blob):
"""
Test for designation type rows_with_key with BLOB.
:param int p_count: The number of rows selected.
int(11)
:param bytes p_blob: The BLOB.
blob
:rtype: dict
"""
ret = {}
rows = StaticDataLayer.execute_sp_rows("call tst_test_rows_with_key1_with_lob(%s, %s)", p_count, p_blob)
for row in rows:
if row['tst_c01'] in ret:
if row['tst_c02'] in ret[row['tst_c01']]:
if row['tst_c03'] in ret[row['tst_c01']][row['tst_c02']]:
raise Exception('Duplicate key for %s.' % str((row['tst_c01'], row['tst_c02'], row['tst_c03'])))
else:
ret[row['tst_c01']][row['tst_c02']][row['tst_c03']] = row
else:
ret[row['tst_c01']][row['tst_c02']] = {row['tst_c03']: row}
else:
ret[row['tst_c01']] = {row['tst_c02']: {row['tst_c03']: row}}
return ret
示例3: tst_test_percent_symbol
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def tst_test_percent_symbol():
"""
Test for stored function with percent symbols.
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call tst_test_percent_symbol()")
示例4: enk_back_get_operators
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_back_get_operators():
"""
Selects all operators (with email addresses).
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_back_get_operators()")
示例5: enk_back_get_host_resources
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_back_get_host_resources():
"""
Selects all host resources.
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_back_get_host_resources()")
示例6: enk_reader_host_load_resources
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_reader_host_load_resources(p_hst_id):
"""
Selects the resources of a host.
:param int p_hst_id: The ID of the host.
smallint(5) unsigned
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_reader_host_load_resources(%s)", p_hst_id)
示例7: enk_front_schedule_get_all_runs
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_front_schedule_get_all_runs(p_sch_id):
"""
Selects all runs of a schedule.
:param int p_sch_id: The ID of the schedule.
smallint(5) unsigned
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_schedule_get_all_runs(%s)", p_sch_id)
示例8: enk_front_run_node_get_resources
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_front_run_node_get_resources(p_rnd_id):
"""
Selects all resources of a node.
:param int p_rnd_id: The ID of the node.
int(11)
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_run_node_get_resources(%s)", p_rnd_id)
示例9: enk_front_run_node_get_logs
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_front_run_node_get_logs(p_rnd_id):
"""
Selects all logs of a run node.
:param int p_rnd_id:
int(11)
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_run_node_get_logs(%s)", p_rnd_id)
示例10: enk_front_run_get_all_run_nodes
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_front_run_get_all_run_nodes(p_run_id):
"""
Selects all nodes of a a run.
:param int p_run_id: The ID of the run.
int(10) unsigned
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_run_get_all_run_nodes(%s)", p_run_id)
示例11: enk_front_run_get_all_dependencies
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_front_run_get_all_dependencies(p_srv_id):
"""
Selects all dependencies of all ports of all nodes of a schedule revision.
:param int p_srv_id: The ID of the schedule revision.
smallint(5) unsigned
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_run_get_all_dependencies(%s)", p_srv_id)
示例12: tst_test_rows1_with_lob
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def tst_test_rows1_with_lob(p_count, p_blob):
"""
Test for designation type rows.
:param int p_count: The number of rows selected.
int(11)
:param bytes p_blob: The BLOB.
blob
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call tst_test_rows1_with_lob(%s, %s)", p_count, p_blob)
示例13: enk_front_run_node_get_status_change
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_front_run_node_get_status_change(p_run_id, p_nsc_id):
"""
Selects all node status changes of a run after a run node status change.
:param int p_run_id: The ID of the run.
int(10) unsigned
:param int p_nsc_id: The ID of the node status change.
int(10) unsigned
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_run_node_get_status_change(%s, %s)", p_run_id, p_nsc_id)
示例14: tst_test_rows1
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def tst_test_rows1(p_count):
"""
Test for designation type row1.
:param int p_count: The number of rows selected.
* 0 For a invalid test.
* 1 For a valid test.
* 2 For a invalid test.
int(11)
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call tst_test_rows1(%s)", p_count)
示例15: enk_back_run_get_dependencies
# 需要导入模块: from pystratum_mysql.StaticDataLayer import StaticDataLayer [as 别名]
# 或者: from pystratum_mysql.StaticDataLayer.StaticDataLayer import execute_sp_rows [as 别名]
def enk_back_run_get_dependencies(p_srv_id):
"""
Selects all dependencies of all ports of all nodes of a schedule revision.
:param int p_srv_id: The Id of the schedule revision.
smallint(5) unsigned
:rtype: dict
"""
ret = {}
rows = StaticDataLayer.execute_sp_rows("call enk_back_run_get_dependencies(%s)", p_srv_id)
for row in rows:
if row['prt_id_dependant'] in ret:
ret[row['prt_id_dependant']].append(row)
else:
ret[row['prt_id_dependant']] = [row]
return ret