api函数
get_db_node(tables,b_id,is_read)
input:tables, b_id,is_read
output:string
explain:传入id的值,如果是单表就返回一个字符串的表名,如果是多表,则对id对10取余,返回10张表的其中一个。
eg:
db_node_name = get_db_node(config.db_business_range,b_auto_id,true)
db_business_range = {
[“0”] = {
max_sn = 4020000000, –该数据库存储企业id最大值
},
["1"] = {
max_sn = 4040000000,
},
}`
本文介绍了一个名为get_db_node的API函数,该函数通过传入ID值来确定数据库表名。如果为单表则直接返回表名;如果是多表,则通过ID值对10取余来选择10张表中的某一张。
1424

被折叠的 条评论
为什么被折叠?



