本文整理汇总了Python中pystratum_mysql.StaticDataLayer.StaticDataLayer类的典型用法代码示例。如果您正苦于以下问题:Python StaticDataLayer类的具体用法?Python StaticDataLayer怎么用?Python StaticDataLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StaticDataLayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: tst_test_rows_with_key1_with_lob
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
示例2: enk_back_controller_init
def enk_back_controller_init():
"""
Sets the database in a predictable state. Must be called by the controller when the controller starts.
:rtype: int
"""
return StaticDataLayer.execute_sp_none("call enk_back_controller_init()")
示例3: tst_test_multi
def tst_test_multi():
"""
Test for designation type multi.
:rtype: int
"""
return StaticDataLayer.execute_sp_multi("call tst_test_multi()")
示例4: tst_test_percent_symbol
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()")
示例5: tst_test_log
def tst_test_log():
"""
Test for designation type log.
:rtype: int
"""
return StaticDataLayer.execute_sp_log("call tst_test_log()")
示例6: tst_magic_constant04
def tst_magic_constant04():
"""
Test for magic constant.
:rtype: *
"""
return StaticDataLayer.execute_sp_singleton1("call tst_magic_constant04()")
示例7: enk_reader_node_store_command_job
def enk_reader_node_store_command_job(p_srv_id, p_uri_id, p_nod_id_parent, p_nod_name, p_nod_recursion_level, p_nod_dependency_level, p_nod_user_name, p_nod_command, p_nod_master):
"""
Stores a node of type "command job" and selects the ID of the new node.
:param int p_srv_id: The ID of the schedule revision.
smallint(5) unsigned
:param int p_uri_id: The ID of the URI of the node.
int(10) unsigned
:param int p_nod_id_parent: The ID of parent node of the node.
int(10) unsigned
:param str p_nod_name: The name of the node.
varchar(64) character set ascii collation ascii_general_ci
:param int p_nod_recursion_level: The recursion level (i.e. the number of parents).
int(11)
:param int p_nod_dependency_level: The dependency level (i.e. the number of dependencies from the parent input ports).
int(11)
:param str p_nod_user_name: The account under which the command must run.
varchar(32) character set utf8 collation utf8_general_ci
:param str p_nod_command: The command that must be executed (serialized array).
varchar(1000) character set utf8 collation utf8_general_ci
:param int p_nod_master:
tinyint(1)
:rtype: *
"""
return StaticDataLayer.execute_sp_singleton1("call enk_reader_node_store_command_job(%s, %s, %s, %s, %s, %s, %s, %s, %s)", p_srv_id, p_uri_id, p_nod_id_parent, p_nod_name, p_nod_recursion_level, p_nod_dependency_level, p_nod_user_name, p_nod_command, p_nod_master)
示例8: tst_constant01
def tst_constant01():
"""
Test for constant.
:rtype: dict[str,*]
"""
return StaticDataLayer.execute_sp_row1("call tst_constant01()")
示例9: enk_front_schedule_get_all
def enk_front_schedule_get_all():
"""
Selects all schedules.
:rtype: list[dict[str,*]]
"""
return StaticDataLayer.execute_sp_rows("call enk_front_schedule_get_all()")
示例10: enk_back_get_operators
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()")
示例11: tst_test_find_designation_type05
def tst_test_find_designation_type05():
"""
Test for designation type.
:rtype: dict[str,*]
"""
return StaticDataLayer.execute_sp_row1("call tst_test_find_designation_type05()")
示例12: enk_back_get_host_resources
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()")
示例13: tst_test_bulk
def tst_test_bulk(bulk_handler):
"""
Test for designation type bulk.
:param pystratum.BulkHandler.BulkHandler bulk_handler: The bulk handler for processing the selected rows.
:rtype: int
"""
return StaticDataLayer.execute_sp_bulk(bulk_handler, "call tst_test_bulk()")
示例14: enk_reader_resource_load_resource
def enk_reader_resource_load_resource(p_rsc_id):
"""
Selects the details of a resource.
:param int p_rsc_id: The ID of the resource.
int(11)
:rtype: dict[str,*]
"""
return StaticDataLayer.execute_sp_row1("call enk_reader_resource_load_resource(%s)", p_rsc_id)
示例15: enk_back_node_get_sch_id_by_nod_id
def enk_back_node_get_sch_id_by_nod_id(p_nod_id):
"""
Selects the ID of a schedule of node.
:param int p_nod_id: The ID of a node.
int(10) unsigned
:rtype: *
"""
return StaticDataLayer.execute_sp_singleton0("call enk_back_node_get_sch_id_by_nod_id(%s)", p_nod_id)