Skip to content

Commit

Permalink
build based on cb003bd
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Apr 3, 2024
1 parent bcc173d commit 3156f9e
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 60 deletions.
66 changes: 33 additions & 33 deletions dev/api/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dev/customtype/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Create Custom Type · Wasabi.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://iskyd.github.io/Wasabi.jl/customtype/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">Wasabi.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../api/">API</a></li><li><a class="tocitem" href="../querybuilder/">Query Builder</a></li><li><a class="tocitem" href="../migrations/">Migrations</a></li><li class="is-active"><a class="tocitem" href>Create Custom Type</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Create Custom Type</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Create Custom Type</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/iskyd/Wasabi.jl/blob/main/docs/src/customtype.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Create-a-Custom-Type"><a class="docs-heading-anchor" href="#Create-a-Custom-Type">Create a Custom Type</a><a id="Create-a-Custom-Type-1"></a><a class="docs-heading-anchor-permalink" href="#Create-a-Custom-Type" title="Permalink"></a></h1><p>You can implement a new custom type just implementing some functions.</p><p><code>Wasabi.to_sql_value(value::CustomType)</code> is used to convert the custom type to the database type</p><p><code>Wasabi.from_sql_value(t::Type{CustomType}, value::Any)</code> is used to convert the value from the database to your custom type</p><p><code>Wasabi.mapping(db::Type{SQLite.DB}, t::Type{CustomType})</code> is used to define the database type</p><p>Suppose you want to create a JSON type called CustomType that is converted as TEXT on the database.</p><pre><code class="nohighlight hljs">using SQLite
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Create Custom Type · Wasabi.jl</title><script data-outdated-warner src="../assets/warner.js"></script><link rel="canonical" href="https://iskyd.github.io/Wasabi.jl/customtype/"/><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.045/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.13.24/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL=".."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="../assets/documenter.js"></script><script src="../siteinfo.js"></script><script src="../../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="../assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="../assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><div class="docs-package-name"><span class="docs-autofit"><a href="../">Wasabi.jl</a></span></div><form class="docs-search" action="../search/"><input class="docs-search-query" id="documenter-search-query" name="q" type="text" placeholder="Search docs"/></form><ul class="docs-menu"><li><a class="tocitem" href="../">Home</a></li><li><a class="tocitem" href="../api/">API</a></li><li><a class="tocitem" href="../querybuilder/">Query Builder</a></li><li><a class="tocitem" href="../migrations/">Migrations</a></li><li class="is-active"><a class="tocitem" href>Create Custom Type</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><nav class="breadcrumb"><ul class="is-hidden-mobile"><li class="is-active"><a href>Create Custom Type</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href>Create Custom Type</a></li></ul></nav><div class="docs-right"><a class="docs-edit-link" href="https://github.com/iskyd/Wasabi.jl/blob/main/docs/src/customtype.md#" title="Edit on GitHub"><span class="docs-icon fab"></span><span class="docs-label is-hidden-touch">Edit on GitHub</span></a><a class="docs-settings-button fas fa-cog" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-sidebar-button fa fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a></div></header><article class="content" id="documenter-page"><h1 id="Create-a-Custom-Type"><a class="docs-heading-anchor" href="#Create-a-Custom-Type">Create a Custom Type</a><a id="Create-a-Custom-Type-1"></a><a class="docs-heading-anchor-permalink" href="#Create-a-Custom-Type" title="Permalink"></a></h1><p>You can implement a new custom type just implementing some functions.</p><p><code>Wasabi.to_sql_value(value::CustomType)</code> is used to convert the custom type to the database type</p><p><code>Wasabi.from_sql_value(t::Type{CustomType}, value::Any)</code> is used to convert the value from the database to your custom type</p><p><code>Wasabi.mapping(db::Type{SQLite.DB}, t::Type{CustomType})</code> is used to define the database type</p><p>Suppose you want to create a JSON type called CustomType that is converted as TEXT on the database.</p><pre><code class="language-julia hljs">using SQLite

struct CustomType
value::Dict
Expand All @@ -17,4 +17,4 @@
model = TestModel(1, CustomType(Dict(&quot;key&quot; =&gt; &quot;value&quot;)))
Wasabi.insert!(conn, model)

model = Wasabi.first(conn, TestModel, 1) # model.custom.value[&quot;key&quot;] == &quot;value&quot;</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../migrations/">« Migrations</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 7 June 2023 17:59">Wednesday 7 June 2023</span>. Using Julia version 1.9.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
model = Wasabi.first(conn, TestModel, 1) # model.custom.value[&quot;key&quot;] == &quot;value&quot;</code></pre></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../migrations/">« Migrations</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 0.27.24 on <span class="colophon-date" title="Wednesday 3 April 2024 17:35">Wednesday 3 April 2024</span>. Using Julia version 1.9.0.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 3156f9e

Please sign in to comment.