Update templates

This commit is contained in:
Jinzhu 2018-02-09 08:20:19 +08:00
parent 9c76bdaf49
commit 870443750c
13 changed files with 211 additions and 421 deletions

View File

@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -872,7 +851,7 @@ db.SetLogger(log.New(os.Stdout, <span class="hljs-string">&quot;\r\n&quot;</span
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Advanced Usage","level":"1.6","depth":1,"next":{"title":"Error Handling","level":"1.6.1","depth":2,"anchor":"#error-handling","path":"advanced.md","ref":"advanced.md#error-handling","articles":[]},"previous":{"title":"Callbacks","level":"1.5","depth":1,"path":"callbacks.md","ref":"callbacks.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"advanced.md","mtime":"2018-02-09T00:11:55.540Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Advanced Usage","level":"1.6","depth":1,"next":{"title":"Error Handling","level":"1.6.1","depth":2,"anchor":"#error-handling","path":"advanced.md","ref":"advanced.md#error-handling","articles":[]},"previous":{"title":"Callbacks","level":"1.5","depth":1,"path":"callbacks.md","ref":"callbacks.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"advanced.md","mtime":"2018-02-09T00:16:33.209Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -968,7 +947,7 @@ db.Model(&amp;user).Association(<span class="hljs-string">&quot;Languages&quot;<
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Associations","level":"1.3.3","depth":2,"next":{"title":"Belongs To","level":"1.3.3.1","depth":3,"anchor":"#belongs-to","path":"associations.md","ref":"associations.md#belongs-to","articles":[]},"previous":{"title":"Conventions & Overriding","level":"1.3.2","depth":2,"anchor":"#conventions","path":"models.md","ref":"models.md#conventions","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"associations.md","mtime":"2018-02-09T00:11:55.541Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Associations","level":"1.3.3","depth":2,"next":{"title":"Belongs To","level":"1.3.3.1","depth":3,"anchor":"#belongs-to","path":"associations.md","ref":"associations.md#belongs-to","articles":[]},"previous":{"title":"Conventions & Overriding","level":"1.3.2","depth":2,"anchor":"#conventions","path":"models.md","ref":"models.md#conventions","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"associations.md","mtime":"2018-02-09T00:16:33.209Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -809,7 +788,7 @@ If you want to use those changes in your callbacks, you need to run your SQL in
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Callbacks","level":"1.5","depth":1,"next":{"title":"Advanced Usage","level":"1.6","depth":1,"path":"advanced.md","ref":"advanced.md","articles":[{"title":"Error Handling","level":"1.6.1","depth":2,"anchor":"#error-handling","path":"advanced.md","ref":"advanced.md#error-handling","articles":[]},{"title":"Transactions","level":"1.6.2","depth":2,"anchor":"#transactions","path":"advanced.md","ref":"advanced.md#transactions","articles":[]},{"title":"Raw SQL & SQL Builder","level":"1.6.3","depth":2,"anchor":"#sql-builder","path":"advanced.md","ref":"advanced.md#sql-builder","articles":[]},{"title":"Generic database interface sql.DB","level":"1.6.4","depth":2,"anchor":"#generic-database-interface-sqldb","path":"advanced.md","ref":"advanced.md#generic-database-interface-sqldb","articles":[]},{"title":"Composite Primary Key","level":"1.6.5","depth":2,"anchor":"#compose-primary-key","path":"advanced.md","ref":"advanced.md#compose-primary-key","articles":[]},{"title":"Overriding Logger","level":"1.6.6","depth":2,"anchor":"#logger","path":"advanced.md","ref":"advanced.md#logger","articles":[]}]},"previous":{"title":"Associations","level":"1.4.6","depth":2,"anchor":"#associations","path":"crud.md","ref":"crud.md#associations","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"callbacks.md","mtime":"2018-02-09T00:12:01.491Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Callbacks","level":"1.5","depth":1,"next":{"title":"Advanced Usage","level":"1.6","depth":1,"path":"advanced.md","ref":"advanced.md","articles":[{"title":"Error Handling","level":"1.6.1","depth":2,"anchor":"#error-handling","path":"advanced.md","ref":"advanced.md#error-handling","articles":[]},{"title":"Transactions","level":"1.6.2","depth":2,"anchor":"#transactions","path":"advanced.md","ref":"advanced.md#transactions","articles":[]},{"title":"Raw SQL & SQL Builder","level":"1.6.3","depth":2,"anchor":"#sql-builder","path":"advanced.md","ref":"advanced.md#sql-builder","articles":[]},{"title":"Generic database interface sql.DB","level":"1.6.4","depth":2,"anchor":"#generic-database-interface-sqldb","path":"advanced.md","ref":"advanced.md#generic-database-interface-sqldb","articles":[]},{"title":"Composite Primary Key","level":"1.6.5","depth":2,"anchor":"#compose-primary-key","path":"advanced.md","ref":"advanced.md#compose-primary-key","articles":[]},{"title":"Overriding Logger","level":"1.6.6","depth":2,"anchor":"#logger","path":"advanced.md","ref":"advanced.md#logger","articles":[]}]},"previous":{"title":"Associations","level":"1.4.6","depth":2,"anchor":"#associations","path":"crud.md","ref":"crud.md#associations","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"callbacks.md","mtime":"2018-02-09T00:16:33.211Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -58,7 +58,7 @@
<link rel="prev" href="dialects.html" />
<link rel="prev" href="development.html" />
</head>
@ -305,6 +305,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -600,48 +615,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter active" data-level="1.9" data-path="changelog.html">
<li class="chapter active" data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -767,7 +746,7 @@
<a href="dialects.html#dialect-specific-columns" class="navigation navigation-prev navigation-unique" aria-label="Previous page: Dialect Specific Columns">
<a href="development.html#write-plugins" class="navigation navigation-prev navigation-unique" aria-label="Previous page: Write Plugins">
<i class="fa fa-angle-left"></i>
</a>
@ -779,7 +758,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Change Log","level":"1.9","depth":1,"previous":{"title":"Dialect Specific Columns","level":"1.8.1","depth":2,"anchor":"#dialect-specific-columns","path":"dialects.md","ref":"dialects.md#dialect-specific-columns","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"changelog.md","mtime":"2018-02-09T00:11:55.542Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Change Log","level":"1.8","depth":1,"previous":{"title":"Write Plugins","level":"1.7.2","depth":2,"anchor":"#write-plugins","path":"development.md","ref":"development.md#write-plugins","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"changelog.md","mtime":"2018-02-09T00:16:33.211Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -60,7 +60,7 @@
<link rel="next" href="crud.html" />
<link rel="prev" href="associations.html" />
<link rel="prev" href="dialects.html" />
</head>
@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -1329,7 +1308,7 @@ db.Set(<span class="hljs-string">&quot;gorm:save_associations&quot;</span>, <spa
<a href="associations.html#association-mode" class="navigation navigation-prev " aria-label="Previous page: Association Mode">
<a href="dialects.html#dialect-data-type" class="navigation navigation-prev " aria-label="Previous page: Dialect Specific Data Type">
<i class="fa fa-angle-left"></i>
</a>
@ -1345,7 +1324,7 @@ db.Set(<span class="hljs-string">&quot;gorm:save_associations&quot;</span>, <spa
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"CRUD: Reading and Writing Data","level":"1.4","depth":1,"next":{"title":"Create","level":"1.4.1","depth":2,"anchor":"#create","path":"crud.md","ref":"crud.md#create","articles":[]},"previous":{"title":"Association Mode","level":"1.3.3.6","depth":3,"anchor":"#association-mode","path":"associations.md","ref":"associations.md#association-mode","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"crud.md","mtime":"2018-02-09T00:12:01.492Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"CRUD: Reading and Writing Data","level":"1.4","depth":1,"next":{"title":"Create","level":"1.4.1","depth":2,"anchor":"#create","path":"crud.md","ref":"crud.md#create","articles":[]},"previous":{"title":"Dialect Specific Data Type","level":"1.3.4","depth":2,"anchor":"#dialect-data-type","path":"dialects.md","ref":"dialects.md#dialect-data-type","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"crud.md","mtime":"2018-02-09T00:16:33.213Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -866,7 +845,7 @@ db.Model(&amp;User{}).RemoveIndex(<span class="hljs-string">&quot;idx_user_name&
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Database","level":"1.2","depth":1,"next":{"title":"Database Connection","level":"1.2.1","depth":2,"anchor":"#connecting-to-a-database","path":"database.md","ref":"database.md#connecting-to-a-database","articles":[]},"previous":{"title":"Getting Started with GORM","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"database.md","mtime":"2018-02-09T00:12:01.493Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Database","level":"1.2","depth":1,"next":{"title":"Database Connection","level":"1.2.1","depth":2,"anchor":"#connecting-to-a-database","path":"database.md","ref":"database.md#connecting-to-a-database","articles":[]},"previous":{"title":"Getting Started with GORM","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"database.md","mtime":"2018-02-09T00:16:33.214Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -812,7 +791,7 @@ db.Callback().RowQuery().Register(<span class="hljs-string">&quot;publish:update
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Development","level":"1.7","depth":1,"next":{"title":"Architecture","level":"1.7.1","depth":2,"anchor":"#architecture","path":"development.md","ref":"development.md#architecture","articles":[]},"previous":{"title":"Overriding Logger","level":"1.6.6","depth":2,"anchor":"#logger","path":"advanced.md","ref":"advanced.md#logger","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"development.md","mtime":"2018-02-09T00:12:01.494Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Development","level":"1.7","depth":1,"next":{"title":"Architecture","level":"1.7.1","depth":2,"anchor":"#architecture","path":"development.md","ref":"development.md#architecture","articles":[]},"previous":{"title":"Overriding Logger","level":"1.6.6","depth":2,"anchor":"#logger","path":"advanced.md","ref":"advanced.md#logger","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"development.md","mtime":"2018-02-09T00:16:33.216Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Dialects · GORM Guide</title>
<title>Dialect Specific Data Type · GORM Guide</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
@ -57,10 +57,10 @@
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="dialects.html" />
<link rel="next" href="crud.html" />
<link rel="prev" href="development.html" />
<link rel="prev" href="associations.html" />
</head>
@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter active" data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -679,7 +658,7 @@
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >Dialects</a>
<a href="." >Dialect Specific Data Type</a>
</h1>
</div>
@ -696,7 +675,7 @@
<h1 id="dialects">Dialects</h1>
<!-- toc -->
<h2 id="dialect-specific-columns">Dialect Specific Columns</h2>
<h2 id="dialect-specific-data-type">Dialect Specific Data Type</h2>
<p>Certain dialects of SQL ship with their own custom, non-standard column types, such as the <code>jsonb</code> column in PostgreSQL. GORM supports loading several of such types, as listed in the following sections.</p>
<h4 id="postgresql">PostgreSQL</h4>
<p>GORM supports loading the following PostgreSQL exclusive column types:</p>
@ -770,12 +749,12 @@ fmt.Println(<span class="hljs-string">&quot;Inserted fields are as expected:&quo
<a href="development.html#write-plugins" class="navigation navigation-prev " aria-label="Previous page: Write Plugins">
<a href="associations.html#association-mode" class="navigation navigation-prev " aria-label="Previous page: Association Mode">
<i class="fa fa-angle-left"></i>
</a>
<a href="dialects.html#dialect-specific-columns" class="navigation navigation-next " aria-label="Next page: Dialect Specific Columns">
<a href="crud.html" class="navigation navigation-next " aria-label="Next page: CRUD: Reading and Writing Data">
<i class="fa fa-angle-right"></i>
</a>
@ -786,7 +765,7 @@ fmt.Println(<span class="hljs-string">&quot;Inserted fields are as expected:&quo
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Dialects","level":"1.8","depth":1,"next":{"title":"Dialect Specific Columns","level":"1.8.1","depth":2,"anchor":"#dialect-specific-columns","path":"dialects.md","ref":"dialects.md#dialect-specific-columns","articles":[]},"previous":{"title":"Write Plugins","level":"1.7.2","depth":2,"anchor":"#write-plugins","path":"development.md","ref":"development.md#write-plugins","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"dialects.md","mtime":"2018-02-09T00:12:01.494Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Dialect Specific Data Type","level":"1.3.4","depth":2,"next":{"title":"CRUD: Reading and Writing Data","level":"1.4","depth":1,"path":"crud.md","ref":"crud.md","articles":[{"title":"Create","level":"1.4.1","depth":2,"anchor":"#create","path":"crud.md","ref":"crud.md#create","articles":[]},{"title":"Query","level":"1.4.2","depth":2,"anchor":"#query","path":"crud.md","ref":"crud.md#query","articles":[]},{"title":"Preloading (Eager Loading)","level":"1.4.3","depth":2,"anchor":"#preloading-eager-loading","path":"crud.md","ref":"crud.md#preloading-eager-loading","articles":[]},{"title":"Update","level":"1.4.4","depth":2,"anchor":"#update","path":"crud.md","ref":"crud.md#update","articles":[]},{"title":"Delete / Soft Delete","level":"1.4.5","depth":2,"anchor":"#delete","path":"crud.md","ref":"crud.md#delete","articles":[]},{"title":"Associations","level":"1.4.6","depth":2,"anchor":"#associations","path":"crud.md","ref":"crud.md#associations","articles":[]}]},"previous":{"title":"Association Mode","level":"1.3.3.6","depth":3,"anchor":"#association-mode","path":"associations.md","ref":"associations.md#association-mode","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"dialects.md","mtime":"2018-02-09T00:17:38.563Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -14,6 +14,7 @@
* [Many To Many](associations.md#many-to-many)
* [Polymorphism](associations.md#polymorphism)
* [Association Mode](associations.md#association-mode)
* [Dialect Specific Data Type](dialects.md#dialect-data-type)
* [CRUD: Reading and Writing Data](crud.md)
* [Create](crud.md#create),
* [Query](crud.md#query),
@ -32,6 +33,4 @@
* [Development](development.md)
* [Architecture](development.md#architecture)
* [Write Plugins](development.md#write-plugins)
* [Dialects](dialects.md)
* [Dialect Specific Columns](dialects.md#dialect-specific-columns)
* [Change Log](changelog.md)

View File

@ -2,17 +2,19 @@
<!-- toc -->
## Dialect Specific Columns
## Dialect Specific Data Type
Certain dialects of SQL ship with their own custom, non-standard column types, such as the ```jsonb``` column in PostgreSQL. GORM supports loading several of such types, as listed in the following sections.
Certain dialects of SQL ship with their own custom, non-standard column types, such as the `jsonb` column in PostgreSQL. GORM supports loading several of such types, as listed in the following sections.
#### PostgreSQL
GORM supports loading the following PostgreSQL exclusive column types:
- jsonb
- hstore
Given the following Model definition:
````go
```go
import (
"encoding/json"
"fmt"
@ -28,11 +30,11 @@ type Document struct {
ID int
}
````
```
You may use the model like so:
````go
```go
password := "0654857340"
metadata := json.RawMessage(`{"is_archived": 0}`)
sampleDoc := Document{
@ -54,5 +56,4 @@ secretsIsEqual := reflect.DeepEqual( resultDoc.Secrets, resultDoc.Secrets)
//this should print "true"
fmt.Println("Inserted fields are as expected:", metadataIsEqual && secretsIsEqual)
````
```

View File

@ -305,6 +305,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -600,48 +615,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -810,7 +789,7 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Getting Started with GORM","level":"1.1","depth":1,"next":{"title":"Database","level":"1.2","depth":1,"path":"database.md","ref":"database.md","articles":[{"title":"Database Connection","level":"1.2.1","depth":2,"anchor":"#connecting-to-a-database","path":"database.md","ref":"database.md#connecting-to-a-database","articles":[]},{"title":"Migration","level":"1.2.2","depth":2,"anchor":"#migration","path":"database.md","ref":"database.md#migration","articles":[]}]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"README.md","mtime":"2018-02-09T00:11:55.539Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Getting Started with GORM","level":"1.1","depth":1,"next":{"title":"Database","level":"1.2","depth":1,"path":"database.md","ref":"database.md","articles":[{"title":"Database Connection","level":"1.2.1","depth":2,"anchor":"#connecting-to-a-database","path":"database.md","ref":"database.md#connecting-to-a-database","articles":[]},{"title":"Migration","level":"1.2.2","depth":2,"anchor":"#migration","path":"database.md","ref":"database.md#migration","articles":[]}]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"README.md","mtime":"2018-02-09T00:16:33.205Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

View File

@ -307,6 +307,21 @@
</ul>
</li>
<li class="chapter " data-level="1.3.4" data-path="dialects.html">
<a href="dialects.html#dialect-data-type">
<b>1.3.4.</b>
Dialect Specific Data Type
</a>
</li>
@ -602,48 +617,12 @@
</li>
<li class="chapter " data-level="1.8" data-path="dialects.html">
<a href="dialects.html">
<b>1.8.</b>
Dialects
</a>
<ul class="articles">
<li class="chapter " data-level="1.8.1" data-path="dialects.html">
<a href="dialects.html#dialect-specific-columns">
<b>1.8.1.</b>
Dialect Specific Columns
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.9" data-path="changelog.html">
<li class="chapter " data-level="1.8" data-path="changelog.html">
<a href="changelog.html">
<b>1.9.</b>
<b>1.8.</b>
Change Log
@ -878,7 +857,7 @@ db.Model(&amp;user).Update(<span class="hljs-string">&quot;name&quot;</span>, <s
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Models","level":"1.3","depth":1,"next":{"title":"Model Definition","level":"1.3.1","depth":2,"anchor":"#model-definition","path":"models.md","ref":"models.md#model-definition","articles":[]},"previous":{"title":"Migration","level":"1.2.2","depth":2,"anchor":"#migration","path":"database.md","ref":"database.md#migration","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"models.md","mtime":"2018-02-09T00:12:01.495Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:14:37.173Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"Models","level":"1.3","depth":1,"next":{"title":"Model Definition","level":"1.3.1","depth":2,"anchor":"#model-definition","path":"models.md","ref":"models.md#model-definition","articles":[]},"previous":{"title":"Migration","level":"1.2.2","depth":2,"anchor":"#migration","path":"database.md","ref":"database.md#migration","articles":[]},"dir":"ltr"},"config":{"plugins":["github","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"fontsettings":{"theme":"night","family":"sans","size":2},"github":{"url":"https://github.com/jinzhu/gorm"},"edit-link":{"label":"Edit This Page","base":"https://github.com/jinzhu/gorm/edit/gh-pages/documents/"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"GORM Guide","gitbook":"*"},"file":{"path":"models.md","mtime":"2018-02-09T00:16:33.219Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-02-09T00:19:45.327Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>

File diff suppressed because one or more lines are too long