org.tinygroup.dbrouter.impl.shardrule
类 ShardRuleBySectionAndHashDifferentSchema

java.lang.Object
  继承者 org.tinygroup.dbrouter.impl.shardrule.ShardRuleBySectionAndHashDifferentSchema
所有已实现的接口:
ShardRule

public class ShardRuleBySectionAndHashDifferentSchema
extends Object
implements ShardRule

区间 shard+ hash

作者:
zhangjian

构造方法摘要
ShardRuleBySectionAndHashDifferentSchema()
           
 
方法摘要
 String getReplacedSql(Partition partition, Shard shard, String sql)
          返回替换好的SQL语句,对于在同一个schema中的用多个表进行分表的话,就需要替换SQL脚本
 boolean isMatch(Partition partition, Shard shard, String sql, Object... preparedParams)
          返回是否属于当前分片处理
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

ShardRuleBySectionAndHashDifferentSchema

public ShardRuleBySectionAndHashDifferentSchema()
方法详细信息

isMatch

public boolean isMatch(Partition partition,
                       Shard shard,
                       String sql,
                       Object... preparedParams)
从接口 ShardRule 复制的描述
返回是否属于当前分片处理

指定者:
接口 ShardRule 中的 isMatch
参数:
partition - 所属的分区
shard - TODO
sql - 要判断的SQL
preparedParams - Prepared Statement的参数
返回:

getReplacedSql

public String getReplacedSql(Partition partition,
                             Shard shard,
                             String sql)
从接口 ShardRule 复制的描述
返回替换好的SQL语句,对于在同一个schema中的用多个表进行分表的话,就需要替换SQL脚本

指定者:
接口 ShardRule 中的 getReplacedSql
参数:
partition - TODO
shard - TODO
返回:

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2006–2015 TinyGroup. All rights reserved.