Skip to content

Commit

Permalink
Updating doc site
Browse files Browse the repository at this point in the history
  • Loading branch information
hanahmily committed Jan 26, 2016
1 parent 4db8808 commit 0e61bf2
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 84 deletions.
2 changes: 1 addition & 1 deletion sharding-jdbc-doc/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
baseurl = "http://dangdangdotcom.github.io/sharding-jdbc"
baseurl = "http://dangdangdotcom.github.io/sharding-jdbc/"
languageCode = "en-us"
title = "Sharding-JDBC"

Expand Down
10 changes: 5 additions & 5 deletions sharding-jdbc-doc/content/post/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ weight=4
+++
# 架构图

![整体架构图1](img/architecture.png)
![整体架构图1](../../img/architecture.png)

![SQL解析](img/parse.png)
![SQL解析](../../img/parse.png)

![SQL路由](img/route.png)
![SQL路由](../../img/route.png)

![SQL执行](img/execute.png)
![SQL执行](../../img/execute.png)

![结果归并](img/merge.png)
![结果归并](../../img/merge.png)

4 changes: 2 additions & 2 deletions sharding-jdbc-doc/content/post/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private static DataSource createDataSource(final String dataSourceName) {
## 策略配置
### 数据源策略与表策略

![策略类图](img/StrategyClass.900.png)
![策略类图](../../img/StrategyClass.900.png)
Sharding-JDBC认为对于分片策略存有两种维度
- 数据源分片策略`DatabaseShardingStrategy`:数据被分配的目标数据源
- 表分片策略`TableShardingStrategy`:数据被分配的目标表,该目标表存在与该数据的目标数据源内。故表分片策略是依赖与数据源分片策略的结果的
Expand Down Expand Up @@ -166,7 +166,7 @@ new TableShardingStrategy(Arrays.asList("order_id","order_type", "order_date")
### 分片算法
分片算法接口类图关系如下:

![算法](img/AlgorithmClass.900.png)
![算法](../../img/AlgorithmClass.900.png)

### 绑定表
绑定表代表一组表,这组表的逻辑表与实际表之间的映射关系是相同的。比如`t_order``t_order_item`就是这样一组绑定表关系,它们的分库与分表策略是完全相同的,那么可以使用它们的表规则将它们配置成绑定表
Expand Down
7 changes: 3 additions & 4 deletions sharding-jdbc-doc/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<base href="/sharding-jdbc/"/>
<title>{{ .Title }}</title>
<!-- Bootstrap Core CSS -->
<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom CSS -->
<link href="css/landing-page.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/landing-page.css" rel="stylesheet">

<!-- Custom Fonts -->
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">

<style>
{{ printf "%v" (partial "template.css" . ) | safeCSS }}
</style>
<link href="css/prism.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/prism.css" rel="stylesheet">
<link href="{{ .Site.BaseURL }}css/table.css" rel="stylesheet">
</head>
<body>
4 changes: 2 additions & 2 deletions sharding-jdbc-doc/layouts/partials/js.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="js/prism.js"></script>
<script src="{{ .Site.BaseURL }}js/prism.js"></script>

{{ if isset .Params "chart" }}
<script src="//cdn.bootcss.com/moment.js/2.11.1/moment.min.js"></script>
<script src="//cdn.bootcss.com/Chart.js/2.0.0-beta2/Chart.min.js"></script>
<script src="data/chart.js"></script>
<script src="{{ .Site.BaseURL }}data/chart.js"></script>
<script>

$("canvas").each(function(){
Expand Down
9 changes: 4 additions & 5 deletions sharding-jdbc-doc/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<base href="/sharding-jdbc/"/>
<title>Sharding-JDBC</title>

<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">


<link href="css/landing-page.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/landing-page.css" rel="stylesheet">


<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -56,8 +55,8 @@
}

</style>
<link href="css/prism.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/prism.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/table.css" rel="stylesheet">
</head>
<body>

Expand Down Expand Up @@ -356,7 +355,7 @@ <h2>相关文档</h2>
<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<script src="js/prism.js"></script>
<script src="http://dangdangdotcom.github.io/sharding-jdbc/js/prism.js"></script>



Expand Down
16 changes: 8 additions & 8 deletions sharding-jdbc-doc/public/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ dataSourceMap.put(&amp;quot;ds_1&amp;quot;, createDataSource(&amp;quot;ds_1&amp;

&lt;h3 id=&#34;数据源策略与表策略:74c632aa9613b8dd6b95bfab1ba313e2&#34;&gt;数据源策略与表策略&lt;/h3&gt;

&lt;p&gt;&lt;img src=&#34;img/StrategyClass.900.png&#34; alt=&#34;策略类图&#34; /&gt;
&lt;p&gt;&lt;img src=&#34;../../img/StrategyClass.900.png&#34; alt=&#34;策略类图&#34; /&gt;
Sharding-JDBC认为对于分片策略存有两种维度
- 数据源分片策略&lt;code&gt;DatabaseShardingStrategy&lt;/code&gt;:数据被分配的目标数据源
- 表分片策略&lt;code&gt;TableShardingStrategy&lt;/code&gt;:数据被分配的目标表,该目标表存在与该数据的目标数据源内。故表分片策略是依赖与数据源分片策略的结果的
Expand All @@ -327,7 +327,7 @@ Sharding-JDBC认为对于分片策略存有两种维度

&lt;pre&gt;&lt;code class=&#34;language-java&#34;&gt;TableRule orderTableRule = new TableRule(&amp;quot;t_order&amp;quot;, Arrays.asList(&amp;quot;t_order_0&amp;quot;, &amp;quot;t_order_1&amp;quot;),
new DatabaseShardingStrategy(&amp;quot;user_id&amp;quot;, new ModuloDatabaseShardingAlgorithm()),
new TableShardingStrategy(&amp;quot;order_id&amp;quot;, new ModuloTableShardingAlgorithm())
new TableShardingStrategy(&amp;quot;order_id&amp;quot;, new ModuloTableShardingAlgorithm()),
dataSourceRule);
&lt;/code&gt;&lt;/pre&gt;

Expand Down Expand Up @@ -375,7 +375,7 @@ Sharding-JDBC认为对于分片策略存有两种维度

&lt;p&gt;分片算法接口类图关系如下:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/AlgorithmClass.900.png&#34; alt=&#34;算法&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/AlgorithmClass.900.png&#34; alt=&#34;算法&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;绑定表:74c632aa9613b8dd6b95bfab1ba313e2&#34;&gt;绑定表&lt;/h3&gt;

Expand Down Expand Up @@ -683,15 +683,15 @@ public Collection&amp;lt;String&amp;gt; doSharding(final Collection&amp;lt;Strin

&lt;h1 id=&#34;架构图:1bf455b3a3c6e1e40be41ef6023b75eb&#34;&gt;架构图&lt;/h1&gt;

&lt;p&gt;&lt;img src=&#34;img/architecture.png&#34; alt=&#34;整体架构图1&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/architecture.png&#34; alt=&#34;整体架构图1&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/parse.png&#34; alt=&#34;SQL解析&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/parse.png&#34; alt=&#34;SQL解析&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/route.png&#34; alt=&#34;SQL路由&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/route.png&#34; alt=&#34;SQL路由&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/execute.png&#34; alt=&#34;SQL执行&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/execute.png&#34; alt=&#34;SQL执行&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/merge.png&#34; alt=&#34;结果归并&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/merge.png&#34; alt=&#34;结果归并&#34; /&gt;&lt;/p&gt;
</description>
</item>

Expand Down
9 changes: 4 additions & 5 deletions sharding-jdbc-doc/public/index/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<base href="/sharding-jdbc/"/>
<title></title>

<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">


<link href="css/landing-page.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/landing-page.css" rel="stylesheet">


<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -56,8 +55,8 @@
}

</style>
<link href="css/prism.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/prism.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/table.css" rel="stylesheet">
</head>
<body>

Expand Down Expand Up @@ -316,7 +315,7 @@ <h2 id="使用基于shardingdatasource的jdbc接口:d680e8a854a7cbad6d490c445cba
<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<script src="js/prism.js"></script>
<script src="http://dangdangdotcom.github.io/sharding-jdbc/js/prism.js"></script>



Expand Down
19 changes: 9 additions & 10 deletions sharding-jdbc-doc/public/post/architecture/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<base href="/sharding-jdbc/"/>
<title>架构图</title>

<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">


<link href="css/landing-page.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/landing-page.css" rel="stylesheet">


<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -56,8 +55,8 @@
}

</style>
<link href="css/prism.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/prism.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/table.css" rel="stylesheet">
</head>
<body>

Expand Down Expand Up @@ -111,15 +110,15 @@

<h1 id="架构图:1bf455b3a3c6e1e40be41ef6023b75eb">架构图</h1>

<p><img src="img/architecture.png" alt="整体架构图1" /></p>
<p><img src="../../img/architecture.png" alt="整体架构图1" /></p>

<p><img src="img/parse.png" alt="SQL解析" /></p>
<p><img src="../../img/parse.png" alt="SQL解析" /></p>

<p><img src="img/route.png" alt="SQL路由" /></p>
<p><img src="../../img/route.png" alt="SQL路由" /></p>

<p><img src="img/execute.png" alt="SQL执行" /></p>
<p><img src="../../img/execute.png" alt="SQL执行" /></p>

<p><img src="img/merge.png" alt="结果归并" /></p>
<p><img src="../../img/merge.png" alt="结果归并" /></p>

</div>
<div class="col-sm-3 col-sm-offset-1 doc-sidebar">
Expand Down Expand Up @@ -157,7 +156,7 @@ <h1 id="架构图:1bf455b3a3c6e1e40be41ef6023b75eb">架构图</h1>
<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<script src="js/prism.js"></script>
<script src="http://dangdangdotcom.github.io/sharding-jdbc/js/prism.js"></script>



Expand Down
9 changes: 4 additions & 5 deletions sharding-jdbc-doc/public/post/features/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<base href="/sharding-jdbc/"/>
<title>详细功能列表</title>

<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">


<link href="css/landing-page.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/landing-page.css" rel="stylesheet">


<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -56,8 +55,8 @@
}

</style>
<link href="css/prism.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/prism.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/table.css" rel="stylesheet">
</head>
<body>

Expand Down Expand Up @@ -205,7 +204,7 @@ <h2 id="稳定性:e1ec7fcfd5aa4d3ea3e990d9b707a3b4">稳定性</h2>
<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<script src="js/prism.js"></script>
<script src="http://dangdangdotcom.github.io/sharding-jdbc/js/prism.js"></script>



Expand Down
9 changes: 4 additions & 5 deletions sharding-jdbc-doc/public/post/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<base href="/sharding-jdbc/"/>
<title>Posts</title>

<link href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">


<link href="css/landing-page.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/landing-page.css" rel="stylesheet">


<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -56,8 +55,8 @@
}

</style>
<link href="css/prism.css" rel="stylesheet">
<link href="css/table.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/prism.css" rel="stylesheet">
<link href="http://dangdangdotcom.github.io/sharding-jdbc/css/table.css" rel="stylesheet">
</head>
<body>

Expand Down Expand Up @@ -148,7 +147,7 @@ <h2>相关文档</h2>
<script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>


<script src="js/prism.js"></script>
<script src="http://dangdangdotcom.github.io/sharding-jdbc/js/prism.js"></script>



Expand Down
16 changes: 8 additions & 8 deletions sharding-jdbc-doc/public/post/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ dataSourceMap.put(&amp;quot;ds_1&amp;quot;, createDataSource(&amp;quot;ds_1&amp;

&lt;h3 id=&#34;数据源策略与表策略:74c632aa9613b8dd6b95bfab1ba313e2&#34;&gt;数据源策略与表策略&lt;/h3&gt;

&lt;p&gt;&lt;img src=&#34;img/StrategyClass.900.png&#34; alt=&#34;策略类图&#34; /&gt;
&lt;p&gt;&lt;img src=&#34;../../img/StrategyClass.900.png&#34; alt=&#34;策略类图&#34; /&gt;
Sharding-JDBC认为对于分片策略存有两种维度
- 数据源分片策略&lt;code&gt;DatabaseShardingStrategy&lt;/code&gt;:数据被分配的目标数据源
- 表分片策略&lt;code&gt;TableShardingStrategy&lt;/code&gt;:数据被分配的目标表,该目标表存在与该数据的目标数据源内。故表分片策略是依赖与数据源分片策略的结果的
Expand All @@ -155,7 +155,7 @@ Sharding-JDBC认为对于分片策略存有两种维度

&lt;pre&gt;&lt;code class=&#34;language-java&#34;&gt;TableRule orderTableRule = new TableRule(&amp;quot;t_order&amp;quot;, Arrays.asList(&amp;quot;t_order_0&amp;quot;, &amp;quot;t_order_1&amp;quot;),
new DatabaseShardingStrategy(&amp;quot;user_id&amp;quot;, new ModuloDatabaseShardingAlgorithm()),
new TableShardingStrategy(&amp;quot;order_id&amp;quot;, new ModuloTableShardingAlgorithm())
new TableShardingStrategy(&amp;quot;order_id&amp;quot;, new ModuloTableShardingAlgorithm()),
dataSourceRule);
&lt;/code&gt;&lt;/pre&gt;

Expand Down Expand Up @@ -203,7 +203,7 @@ Sharding-JDBC认为对于分片策略存有两种维度

&lt;p&gt;分片算法接口类图关系如下:&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/AlgorithmClass.900.png&#34; alt=&#34;算法&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/AlgorithmClass.900.png&#34; alt=&#34;算法&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;绑定表:74c632aa9613b8dd6b95bfab1ba313e2&#34;&gt;绑定表&lt;/h3&gt;

Expand Down Expand Up @@ -511,15 +511,15 @@ public Collection&amp;lt;String&amp;gt; doSharding(final Collection&amp;lt;Strin

&lt;h1 id=&#34;架构图:1bf455b3a3c6e1e40be41ef6023b75eb&#34;&gt;架构图&lt;/h1&gt;

&lt;p&gt;&lt;img src=&#34;img/architecture.png&#34; alt=&#34;整体架构图1&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/architecture.png&#34; alt=&#34;整体架构图1&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/parse.png&#34; alt=&#34;SQL解析&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/parse.png&#34; alt=&#34;SQL解析&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/route.png&#34; alt=&#34;SQL路由&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/route.png&#34; alt=&#34;SQL路由&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/execute.png&#34; alt=&#34;SQL执行&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/execute.png&#34; alt=&#34;SQL执行&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;img/merge.png&#34; alt=&#34;结果归并&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../img/merge.png&#34; alt=&#34;结果归并&#34; /&gt;&lt;/p&gt;
</description>
</item>

Expand Down
Loading

0 comments on commit 0e61bf2

Please sign in to comment.