Skip to content

Commit

Permalink
modify doc for multi schema
Browse files Browse the repository at this point in the history
  • Loading branch information
flike committed Dec 14, 2016
1 parent da96aa1 commit bc94924
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
4 changes: 2 additions & 2 deletions core/hack/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hack

const (
Version = "2016-12-11 09:11:06 +0800 @fd3d87b"
Compile = "2016-12-11 09:32:52 +0800 by go version go1.7.3 darwin/amd64"
Version = "2016-12-11 09:36:57 +0800 @da96aa1"
Compile = "2016-12-14 20:00:54 +0800 by go version go1.7.3 darwin/amd64"
)
10 changes: 6 additions & 4 deletions doc/KingDoc/how_to_use_kingshard.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ nodes :
# 分表规则
schema :
#分表使用的db,所有的分表必须都在这个db中。
db : kingshard
#分表分布的node名字
nodes: [node1,node2]
#所有未分表的SQL,都会发往默认node。
default: node1
shard:
-
#分表名字
#分表使用的db
db : kingshard
#分表名字
table: test_shard_hash
#分表字段
key: id
Expand All @@ -102,7 +102,9 @@ schema :
locations: [4,4]
-
#分表名字
#分表使用的db
db : kingshard
#分表名字
table: test_shard_range
#分表字段
key: id
Expand Down
5 changes: 3 additions & 2 deletions doc/KingDoc/how_to_use_kingshard_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,21 @@ nodes :
# 0 will no down
down_after_noalive: 32
# schema defines which db can be used by client and this db's sql will be executed in which nodes, the db is also the default database
# schema defines which db can be used by client and this db's sql will be executed in which nodes
schema :
db : kingshard
nodes: [node1,node2]
default: node1
shard:
-
db : kingshard
table: test_shard_hash
key: id
nodes: [node1, node2]
type: hash
locations: [4,4]
-
db : kingshard
table: test_shard_range
key: id
type: range
Expand Down
2 changes: 1 addition & 1 deletion doc/KingDoc/kingshard_date_sharding.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ nodes :
# schema defines sharding rules, the db is the sharding table database.
schema :
db : kingshard
nodes: [node1,node2]
default: node1
shard:
-
db : kingshard
table: test_shard_year
key: ctime
type: date_day
Expand Down
8 changes: 5 additions & 3 deletions doc/KingDoc/kingshard_install_document.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ nodes :
# 分表规则
schema :
#分表使用的db,所有的分表必须都在这个db中,连接ks时如果没有指定database默认使用该db。
db : kingshard
#分表分布的node名字
nodes: [node1,node2]
#所有未分表的SQL,都会发往默认node。
default: node1
shard:
-
#分表名字
#分表使用的db
db : kingshard
#分表名字
table: test_shard_hash
#分表字段
key: id
Expand All @@ -93,6 +93,8 @@ schema :
locations: [4,4]
-
#分表使用的db
db : kingshard
#分表名字
table: test_shard_range
#分表字段
Expand Down
3 changes: 2 additions & 1 deletion doc/KingDoc/kingshard_quick_try.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,18 @@
# schema defines which db can be used by client and this db's sql will be executed in which nodes
schema :
db : kingshard
nodes: [node1,node2]
default: node1
shard:
-
db : kingshard
table: test_shard_hash
key: id
nodes: [node1, node2]
type: hash
locations: [4,4]
-
db : kingshard
table: test_shard_range
key: id
type: range
Expand Down
9 changes: 6 additions & 3 deletions doc/KingDoc/kingshard_sharding_introduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ kingshard采用(shardKey%子表个数)的方式得到子表下标。优点
```
schema :
-
db : kingshard
nodes: [node1,node2]
rules:
default: node1
shard:
-
#分表名字
#分表所在的DB
db : kingshard
#分表名字
table: test_shard_hash
#sharding key
key: id
Expand All @@ -50,7 +51,9 @@ kingshard采用(shardKey%子表个数)的方式得到子表下标。优点
locations: [4,4]
-
#分表名字
#分表所在的DB
db : kingshard
#分表名字
table: test_shard_range
#sharding key
key: id
Expand Down

0 comments on commit bc94924

Please sign in to comment.