File tree 4 files changed +7
-5
lines changed
sharding-jdbc-core/src/test/java/com/dangdang/ddframe/rdb/integrate
sharding-jdbc-doc/content/post
4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 67
67
68
68
[ 使用指南] ( http://dangdangdotcom.github.io/sharding-jdbc/post/user_guide/ )
69
69
70
+ [ 基于暗示(Hint)的分片键值注册方法] ( http://dangdangdotcom.github.io/sharding-jdbc/post/hint_shardingvalue/ )
71
+
70
72
[ 详细功能列表] ( http://dangdangdotcom.github.io/sharding-jdbc/post/features/ )
71
73
72
74
[ 核心概念] ( http://dangdangdotcom.github.io/sharding-jdbc/post/conpects/ )
Original file line number Diff line number Diff line change 46
46
47
47
public abstract class AbstractDBUnitTest {
48
48
49
- public static final DatabaseType CURRENT_DB_TYPE = DatabaseType .MySQL ;
49
+ public static final DatabaseType CURRENT_DB_TYPE = DatabaseType .H2 ;
50
50
51
51
private static final Map <String , DataSource > DATA_SOURCES = new HashMap <>();
52
52
Original file line number Diff line number Diff line change 1
1
+++
2
2
date = " 2016-02-05T17:03:18+08:00"
3
- title = " 基于暗示的分片键值注册方法 "
3
+ title = " 基于暗示(Hint)的分片键值注册方法 "
4
4
weight = 12
5
5
+++
6
6
7
- # 基于暗示的分片键值注册方法
7
+ # 基于暗示(Hint)的分片键值注册方法
8
8
9
9
> 提示:阅读本文前请详细预读 [ 使用指南] ( ../user_guide )
10
10
@@ -26,7 +26,7 @@ __现有一个假设,如果`WHERE`中没有`user_id`和`order_id`的条件,
26
26
27
27
答案是肯定的。下面就介绍一下` Sharding-JDBC ` 对这个问题的解决方法。
28
28
29
- ## 基于暗示的分片键值管理器
29
+ ## 基于暗示(Hint)的分片键值管理器
30
30
要解决上面的问题,我们使用` com.dangdang.ddframe.rdb.sharding.api.HintShardingValueManager ` 。
31
31
该管理器是使用` ThreadLocal ` 技术管理分片键值的。
32
32
使用例子:
Original file line number Diff line number Diff line change @@ -386,4 +386,4 @@ String sql = "SELECT i.* FROM t_order o JOIN t_order_item i ON o.order_id=i.orde
386
386
```
387
387
该数据源与普通数据源完全相同,你可以通过上例的API形式来使用,也可以将其配置在Spring,Hibernate等框架中使用。
388
388
389
- > 如果希望不依赖于表中的列传入分片键值,参考:[ 基于暗示的分片键值注册方法 ] ( ../hint_shardingvalue )
389
+ > 如果希望不依赖于表中的列传入分片键值,参考:[ 基于暗示(Hint)的分片键值注册方法 ] ( ../hint_shardingvalue )
You can’t perform that action at this time.
0 commit comments