org.tinygroup.dbrouter.impl.shardrule
类 ShardRuleByFieldValue
java.lang.Object
org.tinygroup.dbrouter.impl.shardrule.ShardRuleByFieldValue
- 所有已实现的接口:
- ShardRule
public class ShardRuleByFieldValue
- extends Object
- implements ShardRule
Created by luoguo on 14-1-22.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShardRuleByFieldValue
public ShardRuleByFieldValue()
isMatch
public boolean isMatch(Partition partition,
Shard shard,
String sql,
Object... preparedParams)
- 从接口
ShardRule 复制的描述
- 返回是否属于当前分片处理
- 指定者:
- 接口
ShardRule 中的 isMatch
- 参数:
partition - 所属的分区shard - TODOsql - 要判断的SQLpreparedParams - Prepared Statement的参数
- 返回:
getReplacedSql
public String getReplacedSql(Partition partition,
Shard shard,
String sql)
- 从接口
ShardRule 复制的描述
- 返回替换好的SQL语句,对于在同一个schema中的用多个表进行分表的话,就需要替换SQL脚本
- 指定者:
- 接口
ShardRule 中的 getReplacedSql
- 参数:
partition - TODOshard - TODO
- 返回:
getFieldWithValues
public List<FieldWithValues> getFieldWithValues()
setFieldWithValues
public void setFieldWithValues(List<FieldWithValues> fieldWithValues)
Copyright © 2006–2015 TinyGroup. All rights reserved.