类 org.tinygroup.dbrouter.config.Shard
的使用

使用 Shard 的软件包
org.tinygroup.dbrouter   
org.tinygroup.dbrouter.balance   
org.tinygroup.dbrouter.config   
org.tinygroup.dbrouter.context   
org.tinygroup.dbrouter.impl   
org.tinygroup.dbrouter.impl.shardrule   
 

org.tinygroup.dbrouterShard 的使用
 

返回变量类型为 Shard 的类型的 org.tinygroup.dbrouter 中的方法
 List<Shard> RouterManager.getShards(Partition partition, String sql, Object... preparedParams)
          获取匹配的分片
 

参数类型为 Shardorg.tinygroup.dbrouter 中的方法
 String ShardRule.getReplacedSql(Partition partition, Shard shard, String sql)
          返回替换好的SQL语句,对于在同一个schema中的用多个表进行分表的话,就需要替换SQL脚本
 String RouterManager.getSql(Partition partition, Shard shard, String sql, Object... preparedParams)
          返回分片执行语句
 boolean RouterManager.isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
          返回某个分片是否匹配
 boolean ShardRule.isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
          返回是否属于当前分片处理
 

org.tinygroup.dbrouter.balanceShard 的使用
 

返回 Shardorg.tinygroup.dbrouter.balance 中的方法
 Shard ShardBalanceDefault.getReadableShard(Partition partition)
           
 Shard ShardBalance.getReadableShard(Partition partition)
          获取读取分区
 Shard ShardBalanceDefault.getReadShardWithTransaction(Partition partition)
           
 Shard ShardBalance.getReadShardWithTransaction(Partition partition)
          获取读取分区,在开启事务的情况下
 

返回变量类型为 Shard 的类型的 org.tinygroup.dbrouter.balance 中的方法
 List<Shard> ShardBalanceDefault.getWritableShard(Partition partition)
           
 List<Shard> ShardBalance.getWritableShard(Partition partition)
          获取写入分区,在所有的写入分区都执行写入相关的指令
 

org.tinygroup.dbrouter.configShard 的使用
 

返回变量类型为 Shard 的类型的 org.tinygroup.dbrouter.config 中的方法
 List<Shard> Partition.getReadShardList()
           
 List<Shard> Partition.getShards()
           
 List<Shard> Partition.getWritableShardList()
           
 

类型变量类型为 Shardorg.tinygroup.dbrouter.config 中的方法参数
 void Partition.setShards(List<Shard> shards)
           
 

org.tinygroup.dbrouter.contextShard 的使用
 

返回 Shardorg.tinygroup.dbrouter.context 中的方法
 Shard ResultSetExecutor.getShard()
           
 Shard RealStatementExecutor.getShard()
           
 

参数类型为 Shardorg.tinygroup.dbrouter.context 中的构造方法
RealStatementExecutor(Statement realStatement, String executeSql, String originalSql, Shard shard, Partition partition, Router router, Object[] values)
           
ResultSetExecutor(ResultSet resultSet, String executeSql, String originalSql, Shard shard, Partition partition, Router router)
           
 

org.tinygroup.dbrouter.implShard 的使用
 

返回变量类型为 Shard 的类型的 org.tinygroup.dbrouter.impl 中的方法
 List<Shard> RouterManagerImpl.getShards(Partition partition, String sql, Object... preparedParams)
           
 

参数类型为 Shardorg.tinygroup.dbrouter.impl 中的方法
 String RouterManagerImpl.getSql(Partition partition, Shard shard, String sql, Object... preparedParams)
           
 boolean RouterManagerImpl.isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
           
 

参数类型为 Shardorg.tinygroup.dbrouter.impl 中的构造方法
InsertSqlTransform(Insert originalInsert, Shard firstShard, DatabaseMetaData metaData)
           
 

org.tinygroup.dbrouter.impl.shardruleShard 的使用
 

参数类型为 Shardorg.tinygroup.dbrouter.impl.shardrule 中的方法
 String ShardRuleByIdDifferentSchema.getReplacedSql(Partition partition, Shard shard, String sql)
           
 String ShardRuleBySectionDifferentSchema.getReplacedSql(Partition partition, Shard shard, String sql)
           
 String ShardRuleByIdSameSchema.getReplacedSql(Partition partition, Shard shard, String sql)
           
 String ShardRuleByFieldValue.getReplacedSql(Partition partition, Shard shard, String sql)
           
 String ShardRuleBySectionAndHashDifferentSchema.getReplacedSql(Partition partition, Shard shard, String sql)
           
 boolean ShardRuleBySectionDifferentSchema.isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
           
 boolean ShardRuleByIdAbstract.isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
           
 boolean ShardRuleByFieldValue.isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
           
 boolean ShardRuleBySectionAndHashDifferentSchema.isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
           
 



Copyright © 2006–2015 TinyGroup. All rights reserved.