本文整理汇总了Python中pystratum_mysql.StaticDataLayer.StaticDataLayer类的典型用法代码示例。如果您正苦于以下问题:Python StaticDataLayer类的具体用法?Python StaticDataLayer怎么用?Python StaticDataLayer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StaticDataLayer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:26,代码来源:TestDataLayer.py
示例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()")
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:7,代码来源:DataLayer.py
示例3: tst_test_multi
def tst_test_multi():
"""
Test for designation type multi.
:rtype: int
"""
return StaticDataLayer.execute_sp_multi("call tst_test_multi()")
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:7,代码来源:TestDataLayer.py
示例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()")
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:7,代码来源:TestDataLayer.py
示例5: tst_test_log
def tst_test_log():
"""
Test for designation type log.
:rtype: int
"""
return StaticDataLayer.execute_sp_log("call tst_test_log()")
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:7,代码来源:TestDataLayer.py
示例6: tst_magic_constant04
def tst_magic_constant04():
"""
Test for magic constant.
:rtype: *
"""
return StaticDataLayer.execute_sp_singleton1("call tst_magic_constant04()")
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:7,代码来源:TestDataLayer.py
示例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)
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:26,代码来源:DataLayer.py
示例8: tst_constant01
def tst_constant01():
"""
Test for constant.
:rtype: dict[str,*]
"""
return StaticDataLayer.execute_sp_row1("call tst_constant01()")
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:7,代码来源:TestDataLayer.py
示例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()")
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:7,代码来源:DataLayer.py
示例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()")
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:7,代码来源:DataLayer.py
示例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()")
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:7,代码来源:TestDataLayer.py
示例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()")
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:7,代码来源:DataLayer.py
示例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()")
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:9,代码来源:TestDataLayer.py
示例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)
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:10,代码来源:DataLayer.py
示例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)
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:10,代码来源:DataLayer.py
示例16: enk_front_run_get_addendum
def enk_front_run_get_addendum(p_run_id):
"""
Selects the addendum of a schedule revision of a run.
:param int p_run_id: The ID of the run.
int(10) unsigned
:rtype: dict[str,*]
"""
return StaticDataLayer.execute_sp_row1("call enk_front_run_get_addendum(%s)", p_run_id)
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:10,代码来源:DataLayer.py
示例17: enk_front_run_node_get_logs
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)
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:10,代码来源:DataLayer.py
示例18: tst_test_max_allowed_packet
def tst_test_max_allowed_packet(p_tmp_blob):
"""
Test for sending data larger than max_allowed_packet.
:param bytes p_tmp_blob: The BLOB larger than max_allowed_packet.
longblob
:rtype: *
"""
return StaticDataLayer.execute_sp_singleton1("call tst_test_max_allowed_packet(%s)", p_tmp_blob)
开发者ID:SetBased,项目名称:py-stratum-mysql,代码行数:10,代码来源:TestDataLayer.py
示例19: enk_misc_insert_uri
def enk_misc_insert_uri(p_uri_uri):
"""
Selects the ID of an URI. If the URI doesn't exists it will be inserted.
:param str p_uri_uri: The URI.
varchar(4000) character set ascii collation ascii_general_ci
:rtype: *
"""
return StaticDataLayer.execute_sp_singleton1("call enk_misc_insert_uri(%s)", p_uri_uri)
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:10,代码来源:DataLayer.py
示例20: enk_front_schedule_get_all_runs
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)
开发者ID:OlegKlimenko,项目名称:py-enarksh,代码行数:10,代码来源:DataLayer.py
注:本文中的pystratum_mysql.StaticDataLayer.StaticDataLayer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论