org.tinygroup.dbrouter.impl.shardrule
类 ShardRuleByIdDifferentSchema

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

public class ShardRuleByIdDifferentSchema
extends ShardRuleByIdAbstract

通过ID进行分片 Created by luoguo on 13-12-15.


构造方法摘要
ShardRuleByIdDifferentSchema()
           
ShardRuleByIdDifferentSchema(String tableName, String primaryKeyFieldName, int remainder)
           
 
方法摘要
 String getReplacedSql(Partition partition, Shard shard, String sql)
          返回替换好的SQL语句,对于在同一个schema中的用多个表进行分表的话,就需要替换SQL脚本
 
从类 org.tinygroup.dbrouter.impl.shardrule.ShardRuleByIdAbstract 继承的方法
getPrimaryKeyFieldName, getRemainder, getTableName, isMatch, setPrimaryKeyFieldName, setRemainder, setTableName
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ShardRuleByIdDifferentSchema

public ShardRuleByIdDifferentSchema()

ShardRuleByIdDifferentSchema

public ShardRuleByIdDifferentSchema(String tableName,
                                    String primaryKeyFieldName,
                                    int remainder)
方法详细信息

getReplacedSql

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

参数:
partition - TODO
shard - TODO
返回:


Copyright © 2006–2015 TinyGroup. All rights reserved.