Exemple #1
0
 def setUp(self):
     sharding_rule_config = load_sharding_rule_config_from_dict(
         rewrite_rule.sharding_rule_config['sharding_rule'])
     self.sharding_rule = ShardingRule(
         sharding_rule_config,
         rewrite_rule.sharding_rule_config['data_sources'].keys())
     self.select_statement = SelectStatement()
     self.insert_statement = InsertStatement()
     self.table_tokens = {'table_x': 'table_1'}
 def setUp(self):
     sharding_rule_config = load_sharding_rule_config_from_dict(rule_config['sharding_rule'])
     self.sharding_rule = ShardingRule(sharding_rule_config, ['ds0', 'ds1'])
Exemple #3
0
 def get_sharding_rule(self):
     sharding_rule_config = load_sharding_rule_config_from_dict(
         parser_rule.sharding_rule_config['sharding_rule'])
     return ShardingRule(
         sharding_rule_config,
         parser_rule.sharding_rule_config['data_sources'].keys())
 def setUp(self):
     sharding_rule_config = load_sharding_rule_config_from_dict(
         rule_config['sharding_rule'])
     sharding_rule = ShardingRule(sharding_rule_config, ['ds0', 'ds1'])
     self.database_broadcast_routing_engine = DatabaseBroadcastRoutingEngine(
         sharding_rule)