docs: publish site from 5fede123
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Convert QueryParam to rusqlite::types::Value"><title>convert_params in jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">convert_params</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>db_<wbr>service</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">db_service</a></div><h1>Function <span class="fn">convert_<wbr>params</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#297-309">Source</a> </span></div><pre class="rust item-decl"><code>fn convert_params(params: &[<a class="enum" href="enum.QueryParam.html" title="enum jellytau_lib::storage::db_service::QueryParam">QueryParam</a>]) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><Value></code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Convert QueryParam to rusqlite::types::Value</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `execute_query` fn in crate `jellytau_lib`."><title>execute_query in jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">execute_query</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>db_<wbr>service</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">db_service</a></div><h1>Function <span class="fn">execute_<wbr>query</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#251-255">Source</a> </span></div><pre class="rust item-decl"><code>fn execute_query(conn: &Connection, query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>></code></pre></section></div></main></body></html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `query_many` fn in crate `jellytau_lib`."><title>query_many in jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">query_many</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>db_<wbr>service</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">db_service</a></div><h1>Function <span class="fn">query_<wbr>many</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#279-294">Source</a> </span></div><pre class="rust item-decl"><code>fn query_many<T, F>(
|
||||
conn: &Connection,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>><div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> Result<T>,</div></code></pre></section></div></main></body></html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `query_one` fn in crate `jellytau_lib`."><title>query_one in jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">query_one</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>db_<wbr>service</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">db_service</a></div><h1>Function <span class="fn">query_<wbr>one</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#257-264">Source</a> </span></div><pre class="rust item-decl"><code>fn query_one<T, F>(
|
||||
conn: &Connection,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>><div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> Result<T>,</div></code></pre></section></div></main></body></html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `query_optional` fn in crate `jellytau_lib`."><title>query_optional in jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc fn"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">query_optional</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>db_<wbr>service</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">db_service</a></div><h1>Function <span class="fn">query_<wbr>optional</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#266-277">Source</a> </span></div><pre class="rust item-decl"><code>fn query_optional<T, F>(
|
||||
conn: &Connection,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.97.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>><div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> Result<T>,</div></code></pre></section></div></main></body></html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Database service abstraction layer"><title>jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module db_service</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module db_<wbr>service</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li><li><a href="#types" title="Type Aliases">Type Aliases</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In jellytau_<wbr>lib::<wbr>storage</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a></div><h1>Module <span>db_<wbr>service</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#1-413">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Database service abstraction layer</p>
|
||||
<p>This module provides an async database interface that abstracts away
|
||||
the underlying database implementation. This makes it easy to:</p>
|
||||
<ul>
|
||||
<li>Switch between sync (rusqlite) and async (tokio-rusqlite) implementations</li>
|
||||
<li>Prevent blocking the async runtime with synchronous database calls</li>
|
||||
<li>Test with different database backends</li>
|
||||
<li>Migrate to other database systems in the future</li>
|
||||
</ul>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a></dt><dd>Represents a database query that can be executed</dd><dt><a class="struct" href="struct.RusqliteService.html" title="struct jellytau_lib::storage::db_service::RusqliteService">Rusqlite<wbr>Service</a></dt><dd>Rusqlite-based database service implementation</dd><dt><a class="struct" href="struct.Transaction.html" title="struct jellytau_lib::storage::db_service::Transaction">Transaction</a></dt><dd>Transaction handle for batching multiple operations</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.QueryParam.html" title="enum jellytau_lib::storage::db_service::QueryParam">Query<wbr>Param</a></dt><dd>Query parameter types supported by the database</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.DatabaseService.html" title="trait jellytau_lib::storage::db_service::DatabaseService">Database<wbr>Service</a></dt><dd>Database service trait - abstraction over database operations</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.convert_params.html" title="fn jellytau_lib::storage::db_service::convert_params">convert_<wbr>params</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Convert QueryParam to rusqlite::types::Value</dd><dt><a class="fn" href="fn.execute_query.html" title="fn jellytau_lib::storage::db_service::execute_query">execute_<wbr>query</a><span title="Restricted Visibility"> 🔒</span> </dt><dt><a class="fn" href="fn.query_many.html" title="fn jellytau_lib::storage::db_service::query_many">query_<wbr>many</a><span title="Restricted Visibility"> 🔒</span> </dt><dt><a class="fn" href="fn.query_one.html" title="fn jellytau_lib::storage::db_service::query_one">query_<wbr>one</a><span title="Restricted Visibility"> 🔒</span> </dt><dt><a class="fn" href="fn.query_optional.html" title="fn jellytau_lib::storage::db_service::query_optional">query_<wbr>optional</a><span title="Restricted Visibility"> 🔒</span> </dt></dl><h2 id="types" class="section-header">Type Aliases<a href="#types" class="anchor">§</a></h2><dl class="item-table"><dt><a class="type" href="type.DbResult.html" title="type jellytau_lib::storage::db_service::DbResult">DbResult</a></dt><dd>Database query result type</dd></dl></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"enum":["QueryParam"],"fn":["convert_params","execute_query","query_many","query_one","query_optional"],"struct":["Query","RusqliteService","Transaction"],"trait":["DatabaseService"],"type":["DbResult"]};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,110 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Database service trait - abstraction over database operations"><title>DatabaseService in jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">DatabaseService</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Database<wbr>Service</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.execute" title="execute">execute</a></li><li><a href="#tymethod.execute_batch" title="execute_batch">execute_batch</a></li><li><a href="#tymethod.last_insert_rowid" title="last_insert_rowid">last_insert_rowid</a></li><li><a href="#tymethod.query_many" title="query_many">query_many</a></li><li><a href="#tymethod.query_one" title="query_one">query_one</a></li><li><a href="#tymethod.query_optional" title="query_optional">query_optional</a></li><li><a href="#tymethod.transaction" title="transaction">transaction</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>db_<wbr>service</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">db_service</a></div><h1>Trait <span class="trait">Database<wbr>Service</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#54-88">Source</a> </span></div><pre class="rust item-decl"><code>pub trait DatabaseService: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> {
|
||||
// Required methods
|
||||
fn <a href="#tymethod.execute" class="fn">execute</a><'life0, 'async_trait>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||||
<span class="where">where Self: 'async_trait,
|
||||
'life0: 'async_trait</span>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.execute_batch" class="fn">execute_batch</a><'life0, 'life1, 'async_trait>(
|
||||
&'life0 self,
|
||||
sql: &'life1 <a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a>,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||||
<span class="where">where Self: 'async_trait,
|
||||
'life0: 'async_trait,
|
||||
'life1: 'async_trait</span>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.query_one" class="fn">query_one</a><'life0, 'async_trait, T, F>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> SqliteResult<T> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait</span>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.query_optional" class="fn">query_optional</a><'life0, 'async_trait, T, F>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.97.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> SqliteResult<T> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait</span>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.query_many" class="fn">query_many</a><'life0, 'async_trait, T, F>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||||
<span class="where">where T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> SqliteResult<T> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait</span>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.transaction" class="fn">transaction</a><'life0, 'async_trait, F, T>(
|
||||
&'life0 self,
|
||||
f: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||||
<span class="where">where F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut <a class="struct" href="struct.Transaction.html" title="struct jellytau_lib::storage::db_service::Transaction">Transaction</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait</span>;
|
||||
<span class="item-spacer"></span> fn <a href="#tymethod.last_insert_rowid" class="fn">last_insert_rowid</a><'life0, 'async_trait>(
|
||||
&'life0 self,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.i64.html">i64</a>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>>
|
||||
<span class="where">where Self: 'async_trait,
|
||||
'life0: 'async_trait</span>;
|
||||
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Database service trait - abstraction over database operations</p>
|
||||
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.execute" class="method"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#56">Source</a><h4 class="code-header">fn <a href="#tymethod.execute" class="fn">execute</a><'life0, 'async_trait>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.usize.html">usize</a>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Execute a query that doesn’t return results (INSERT, UPDATE, DELETE)</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.execute_batch" class="method"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#60">Source</a><h4 class="code-header">fn <a href="#tymethod.execute_batch" class="fn">execute_batch</a><'life0, 'life1, 'async_trait>(
|
||||
&'life0 self,
|
||||
sql: &'life1 <a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a>,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.unit.html">()</a>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait,
|
||||
'life1: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Execute a batch of SQL statements (for migrations)</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.query_one" class="method"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#63-66">Source</a><h4 class="code-header">fn <a href="#tymethod.query_one" class="fn">query_one</a><'life0, 'async_trait, T, F>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||||
T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> SqliteResult<T> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Query a single row</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.query_optional" class="method"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#69-72">Source</a><h4 class="code-header">fn <a href="#tymethod.query_optional" class="fn">query_optional</a><'life0, 'async_trait, T, F>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/1.97.1/core/option/enum.Option.html" title="enum core::option::Option">Option</a><T>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||||
T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> SqliteResult<T> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Query a single optional row</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.query_many" class="method"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#75-78">Source</a><h4 class="code-header">fn <a href="#tymethod.query_many" class="fn">query_many</a><'life0, 'async_trait, T, F>(
|
||||
&'life0 self,
|
||||
query: <a class="struct" href="struct.Query.html" title="struct jellytau_lib::storage::db_service::Query">Query</a>,
|
||||
mapper: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><T>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||||
T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&Row<'_>) -> SqliteResult<T> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Query multiple rows</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.transaction" class="method"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#81-84">Source</a><h4 class="code-header">fn <a href="#tymethod.transaction" class="fn">transaction</a><'life0, 'async_trait, F, T>(
|
||||
&'life0 self,
|
||||
f: F,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||||
F: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(&mut <a class="struct" href="struct.Transaction.html" title="struct jellytau_lib::storage::db_service::Transaction">Transaction</a><'_>) -> <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
T: <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'static + 'async_trait,
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Run a transaction with multiple operations</p>
|
||||
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.last_insert_rowid" class="method"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#87">Source</a><h4 class="code-header">fn <a href="#tymethod.last_insert_rowid" class="fn">last_insert_rowid</a><'life0, 'async_trait>(
|
||||
&'life0 self,
|
||||
) -> <a class="struct" href="https://doc.rust-lang.org/1.97.1/core/pin/struct.Pin.html" title="struct core::pin::Pin">Pin</a><<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a><dyn <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/future/future/trait.Future.html" title="trait core::future::future::Future">Future</a><Output = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.i64.html">i64</a>, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>> + <a class="trait" href="https://doc.rust-lang.org/1.97.1/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + 'async_trait>><div class="where">where
|
||||
Self: 'async_trait,
|
||||
'life0: 'async_trait,</div></h4></section></summary><div class="docblock"><p>Get the row ID of the most recent successful INSERT</p>
|
||||
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/1.97.1/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><div class="negative-marker"></div><section id="impl-DatabaseService-for-RusqliteService" class="impl"><a class="src rightside" href="../../../src/jellytau_lib/storage/db_service.rs.html#127-247">Source</a><a href="#impl-DatabaseService-for-RusqliteService" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.DatabaseService.html" title="trait jellytau_lib::storage::db_service::DatabaseService">DatabaseService</a> for <a class="struct" href="struct.RusqliteService.html" title="struct jellytau_lib::storage::db_service::RusqliteService">RusqliteService</a></h3></section></div><script src="../../../trait.impl/jellytau_lib/storage/db_service/trait.DatabaseService.js" async></script></section></div></main></body></html>
|
||||
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Database query result type"><title>DbResult in jellytau_lib::storage::db_service - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc type"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">DbResult</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">DbResult</a></h2><h3><a href="#aliased-type">Aliased Type</a></h3><h3><a href="#variants">Variants</a></h3><ul class="block variant"><li><a href="#variant.Err" title="Err">Err</a></li><li><a href="#variant.Ok" title="Ok">Ok</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>db_<wbr>service</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">db_service</a></div><h1>Type Alias <span class="type">DbResult</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/db_service.rs.html#15">Source</a> </span></div><pre class="rust item-decl"><code>pub type DbResult<T> = <a class="enum" href="https://doc.rust-lang.org/1.97.1/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>>;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Database query result type</p>
|
||||
</div></details><h2 id="aliased-type" class="section-header">Aliased Type<a href="#aliased-type" class="anchor">§</a></h2><pre class="rust item-decl"><code>pub enum DbResult<T> {
|
||||
Ok(T),
|
||||
Err(<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>),
|
||||
}</code></pre><h2 id="variants" class="variants section-header">Variants<a href="#variants" class="anchor">§</a></h2><div class="variants"><section id="variant.Ok" class="variant"><a href="#variant.Ok" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Ok(T)</h3></section><div class="docblock"><p>Contains the success value</p>
|
||||
</div><section id="variant.Err" class="variant"><a href="#variant.Err" class="anchor">§</a><span class="since rightside" title="Stable since Rust version 1.0.0">1.0.0</span><h3 class="code-header">Err(<a class="struct" href="https://doc.rust-lang.org/1.97.1/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</h3></section><div class="docblock"><p>Contains the error value</p>
|
||||
</div></div><script src="../../../type.impl/core/result/enum.Result.js" data-self-path="jellytau_lib::storage::db_service::DbResult" async></script></section></div></main></body></html>
|
||||
@@ -0,0 +1,4 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Offline storage module using SQLite"><title>jellytau_lib::storage - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module storage</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module storage</a></h2><h3><a href="#reexports">Module Items</a></h3><ul class="block"><li><a href="#reexports" title="Re-exports">Re-exports</a></li><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate jellytau_<wbr>lib</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">jellytau_lib</a></div><h1>Module <span>storage</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/jellytau_lib/storage/mod.rs.html#1-765">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Offline storage module using SQLite</p>
|
||||
<p>Provides local caching of Jellyfin metadata, download management,
|
||||
and offline mutation queue for sync-back operations.</p>
|
||||
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><dl class="item-table reexports"><dt id="reexport.DatabaseService"><code>pub use db_service::<a class="trait" href="db_service/trait.DatabaseService.html" title="trait jellytau_lib::storage::db_service::DatabaseService">DatabaseService</a>;</code></dt><dt id="reexport.RusqliteService"><code>pub use db_service::<a class="struct" href="db_service/struct.RusqliteService.html" title="struct jellytau_lib::storage::db_service::RusqliteService">RusqliteService</a>;</code></dt></dl><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="db_service/index.html" title="mod jellytau_lib::storage::db_service">db_<wbr>service</a></dt><dd>Database service abstraction layer</dd><dt><a class="mod" href="models/index.html" title="mod jellytau_lib::storage::models">models</a></dt><dd>Database model structs</dd><dt><a class="mod" href="schema/index.html" title="mod jellytau_lib::storage::schema">schema</a></dt><dd>Database schema and migrations</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Database.html" title="struct jellytau_lib::storage::Database">Database</a></dt><dd>Database connection wrapper with thread-safe access</dd></dl></section></div></main></body></html>
|
||||
@@ -0,0 +1,2 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Database model structs"><title>jellytau_lib::storage::models - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module models</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module models</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In jellytau_<wbr>lib::<wbr>storage</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a></div><h1>Module <span>models</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/models.rs.html#1-133">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Database model structs</p>
|
||||
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.PlaylistItem.html" title="struct jellytau_lib::storage::models::PlaylistItem">Playlist<wbr>Item</a></dt><dd>Playlist item entry</dd></dl></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"struct":["PlaylistItem"]};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="List of migrations to apply in order. Each migration is a tuple of (name, sql)."><title>MIGRATIONS in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATIONS</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATIONS</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#7-31">Source</a> </span></div><pre class="rust item-decl"><code>pub const MIGRATIONS: &[(&<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a>, &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a>)];</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>List of migrations to apply in order.
|
||||
Each migration is a tuple of (name, sql).</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,262 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Initial schema migration"><title>MIGRATION_001 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_001</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>001</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#34-294">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_001: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Jellyfin servers the user has connected to
|
||||
CREATE TABLE IF NOT EXISTS servers (
|
||||
id TEXT PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
url TEXT NOT NULL UNIQUE,
|
||||
version TEXT,
|
||||
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
last_connected_at TEXT
|
||||
);
|
||||
|
||||
-- User accounts on Jellyfin servers
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id TEXT PRIMARY KEY,
|
||||
server_id TEXT NOT NULL REFERENCES servers(id) ON DELETE CASCADE,
|
||||
username TEXT NOT NULL,
|
||||
access_token TEXT,
|
||||
is_active INTEGER DEFAULT 0,
|
||||
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
last_login_at TEXT,
|
||||
UNIQUE(server_id, username)
|
||||
);
|
||||
|
||||
-- Libraries/views from Jellyfin
|
||||
CREATE TABLE IF NOT EXISTS libraries (
|
||||
id TEXT PRIMARY KEY,
|
||||
server_id TEXT NOT NULL REFERENCES servers(id) ON DELETE CASCADE,
|
||||
name TEXT NOT NULL,
|
||||
collection_type TEXT,
|
||||
image_tag TEXT,
|
||||
sort_order INTEGER DEFAULT 0,
|
||||
synced_at TEXT,
|
||||
UNIQUE(server_id, id)
|
||||
);
|
||||
|
||||
-- Media items (movies, shows, episodes, albums, songs, artists)
|
||||
CREATE TABLE IF NOT EXISTS items (
|
||||
id TEXT PRIMARY KEY,
|
||||
server_id TEXT NOT NULL REFERENCES servers(id) ON DELETE CASCADE,
|
||||
library_id TEXT REFERENCES libraries(id) ON DELETE SET NULL,
|
||||
parent_id TEXT REFERENCES items(id) ON DELETE CASCADE,
|
||||
|
||||
-- Core metadata
|
||||
name TEXT NOT NULL,
|
||||
sort_name TEXT,
|
||||
original_title TEXT,
|
||||
item_type TEXT NOT NULL, -- Movie, Series, Episode, MusicAlbum, Audio, MusicArtist, etc.
|
||||
|
||||
-- Media info
|
||||
overview TEXT,
|
||||
tagline TEXT,
|
||||
genres TEXT, -- JSON array
|
||||
tags TEXT, -- JSON array
|
||||
studios TEXT, -- JSON array
|
||||
|
||||
-- For episodes
|
||||
series_id TEXT,
|
||||
series_name TEXT,
|
||||
season_id TEXT,
|
||||
season_name TEXT,
|
||||
index_number INTEGER, -- Episode number
|
||||
parent_index_number INTEGER, -- Season number
|
||||
|
||||
-- For music
|
||||
album_id TEXT,
|
||||
album_name TEXT,
|
||||
album_artist TEXT,
|
||||
artists TEXT, -- JSON array
|
||||
|
||||
-- Dates
|
||||
premiere_date TEXT,
|
||||
production_year INTEGER,
|
||||
date_created TEXT,
|
||||
|
||||
-- Runtime (ticks)
|
||||
runtime_ticks INTEGER,
|
||||
|
||||
-- Images
|
||||
primary_image_tag TEXT,
|
||||
backdrop_image_tags TEXT, -- JSON array
|
||||
|
||||
-- Ratings
|
||||
community_rating REAL,
|
||||
official_rating TEXT,
|
||||
|
||||
-- Sync metadata
|
||||
synced_at TEXT,
|
||||
etag TEXT,
|
||||
|
||||
UNIQUE(server_id, id)
|
||||
);
|
||||
|
||||
-- Full-text search index for items
|
||||
CREATE VIRTUAL TABLE IF NOT EXISTS items_fts USING fts5(
|
||||
name,
|
||||
overview,
|
||||
album_name,
|
||||
album_artist,
|
||||
artists,
|
||||
series_name,
|
||||
content='items',
|
||||
content_rowid='rowid'
|
||||
);
|
||||
|
||||
-- Triggers to keep FTS index in sync
|
||||
CREATE TRIGGER IF NOT EXISTS items_ai AFTER INSERT ON items BEGIN
|
||||
INSERT INTO items_fts(rowid, name, overview, album_name, album_artist, artists, series_name)
|
||||
VALUES (new.rowid, new.name, new.overview, new.album_name, new.album_artist, new.artists, new.series_name);
|
||||
END;
|
||||
|
||||
CREATE TRIGGER IF NOT EXISTS items_ad AFTER DELETE ON items BEGIN
|
||||
INSERT INTO items_fts(items_fts, rowid, name, overview, album_name, album_artist, artists, series_name)
|
||||
VALUES('delete', old.rowid, old.name, old.overview, old.album_name, old.album_artist, old.artists, old.series_name);
|
||||
END;
|
||||
|
||||
CREATE TRIGGER IF NOT EXISTS items_au AFTER UPDATE ON items BEGIN
|
||||
INSERT INTO items_fts(items_fts, rowid, name, overview, album_name, album_artist, artists, series_name)
|
||||
VALUES('delete', old.rowid, old.name, old.overview, old.album_name, old.album_artist, old.artists, old.series_name);
|
||||
INSERT INTO items_fts(rowid, name, overview, album_name, album_artist, artists, series_name)
|
||||
VALUES (new.rowid, new.name, new.overview, new.album_name, new.album_artist, new.artists, new.series_name);
|
||||
END;
|
||||
|
||||
-- Media streams (audio/subtitle tracks)
|
||||
CREATE TABLE IF NOT EXISTS media_streams (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
item_id TEXT NOT NULL REFERENCES items(id) ON DELETE CASCADE,
|
||||
stream_index INTEGER NOT NULL,
|
||||
stream_type TEXT NOT NULL, -- Audio, Subtitle, Video
|
||||
codec TEXT,
|
||||
language TEXT,
|
||||
display_title TEXT,
|
||||
is_default INTEGER DEFAULT 0,
|
||||
is_forced INTEGER DEFAULT 0,
|
||||
is_external INTEGER DEFAULT 0,
|
||||
path TEXT, -- For external subtitles
|
||||
UNIQUE(item_id, stream_index)
|
||||
);
|
||||
|
||||
-- User-specific data (watch progress, favorites)
|
||||
CREATE TABLE IF NOT EXISTS user_data (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
item_id TEXT NOT NULL REFERENCES items(id) ON DELETE CASCADE,
|
||||
|
||||
-- Playback state
|
||||
playback_position_ticks INTEGER DEFAULT 0,
|
||||
play_count INTEGER DEFAULT 0,
|
||||
is_played INTEGER DEFAULT 0,
|
||||
is_favorite INTEGER DEFAULT 0,
|
||||
|
||||
-- Timestamps
|
||||
last_played_at TEXT,
|
||||
|
||||
-- Sync status
|
||||
synced_at TEXT,
|
||||
pending_sync INTEGER DEFAULT 0, -- 1 if local changes need sync
|
||||
|
||||
UNIQUE(user_id, item_id)
|
||||
);
|
||||
|
||||
-- Downloaded media files
|
||||
CREATE TABLE IF NOT EXISTS downloads (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
item_id TEXT NOT NULL REFERENCES items(id) ON DELETE CASCADE,
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
|
||||
-- File info
|
||||
file_path TEXT NOT NULL,
|
||||
file_size INTEGER,
|
||||
mime_type TEXT,
|
||||
|
||||
-- Download state
|
||||
status TEXT DEFAULT 'pending', -- pending, downloading, completed, failed, paused
|
||||
progress REAL DEFAULT 0, -- 0.0 to 1.0
|
||||
|
||||
-- Transcoding options used
|
||||
bitrate INTEGER,
|
||||
container TEXT,
|
||||
|
||||
-- Timestamps
|
||||
queued_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
started_at TEXT,
|
||||
completed_at TEXT,
|
||||
|
||||
-- Error tracking
|
||||
error_message TEXT,
|
||||
retry_count INTEGER DEFAULT 0,
|
||||
|
||||
UNIQUE(item_id, user_id)
|
||||
);
|
||||
|
||||
-- Offline mutation queue (changes to sync back to server)
|
||||
CREATE TABLE IF NOT EXISTS sync_queue (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
|
||||
-- Operation details
|
||||
operation TEXT NOT NULL, -- mark_played, mark_favorite, update_progress, etc.
|
||||
item_id TEXT,
|
||||
payload TEXT, -- JSON data for the operation
|
||||
|
||||
-- Queue state
|
||||
status TEXT DEFAULT 'pending', -- pending, processing, completed, failed
|
||||
retry_count INTEGER DEFAULT 0,
|
||||
|
||||
-- Timestamps
|
||||
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
processed_at TEXT,
|
||||
|
||||
-- Error tracking
|
||||
error_message TEXT
|
||||
);
|
||||
|
||||
-- Cached thumbnails
|
||||
CREATE TABLE IF NOT EXISTS thumbnails (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
item_id TEXT NOT NULL REFERENCES items(id) ON DELETE CASCADE,
|
||||
image_type TEXT NOT NULL, -- Primary, Backdrop, Thumb, Logo, etc.
|
||||
image_tag TEXT NOT NULL,
|
||||
file_path TEXT NOT NULL,
|
||||
width INTEGER,
|
||||
height INTEGER,
|
||||
cached_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(item_id, image_type, image_tag)
|
||||
);
|
||||
|
||||
-- User playlists (local + synced)
|
||||
CREATE TABLE IF NOT EXISTS playlists (
|
||||
id TEXT PRIMARY KEY,
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
name TEXT NOT NULL,
|
||||
is_local INTEGER DEFAULT 0, -- 1 for local-only playlists
|
||||
jellyfin_id TEXT, -- NULL for local-only
|
||||
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TEXT
|
||||
);
|
||||
|
||||
-- Playlist items
|
||||
CREATE TABLE IF NOT EXISTS playlist_items (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
playlist_id TEXT NOT NULL REFERENCES playlists(id) ON DELETE CASCADE,
|
||||
item_id TEXT NOT NULL REFERENCES items(id) ON DELETE CASCADE,
|
||||
sort_order INTEGER NOT NULL,
|
||||
added_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(playlist_id, item_id)
|
||||
);
|
||||
|
||||
-- Indexes for common queries
|
||||
CREATE INDEX IF NOT EXISTS idx_items_server ON items(server_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_items_library ON items(library_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_items_parent ON items(parent_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_items_type ON items(item_type);
|
||||
CREATE INDEX IF NOT EXISTS idx_items_album ON items(album_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_items_series ON items(series_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_items_season ON items(season_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_user_data_user ON user_data(user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_user_data_item ON user_data(item_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_status ON downloads(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_sync_queue_status ON sync_queue(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_thumbnails_item ON thumbnails(item_id);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Initial schema migration</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to remove access_token column from users table Tokens are now stored in the system keyring (or encrypted file fallback)"><title>MIGRATION_002 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_002</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>002</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#298-320">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_002: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Remove access_token column from users table
|
||||
-- Tokens are now stored in secure storage (system keyring)
|
||||
|
||||
-- SQLite doesn't support DROP COLUMN in older versions, so we recreate the table
|
||||
CREATE TABLE IF NOT EXISTS users_new (
|
||||
id TEXT PRIMARY KEY,
|
||||
server_id TEXT NOT NULL REFERENCES servers(id) ON DELETE CASCADE,
|
||||
username TEXT NOT NULL,
|
||||
is_active INTEGER DEFAULT 0,
|
||||
created_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
last_login_at TEXT,
|
||||
UNIQUE(server_id, username)
|
||||
);
|
||||
|
||||
-- Copy existing data (excluding access_token)
|
||||
INSERT OR IGNORE INTO users_new (id, server_id, username, is_active, created_at, last_login_at)
|
||||
SELECT id, server_id, username, is_active, created_at, last_login_at FROM users;
|
||||
|
||||
-- Drop old table and rename new one
|
||||
DROP TABLE IF EXISTS users;
|
||||
ALTER TABLE users_new RENAME TO users;
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to remove access_token column from users table
|
||||
Tokens are now stored in the system keyring (or encrypted file fallback)</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to relax foreign key constraints on user_data table Allows tracking playback progress for items not yet synced to local database"><title>MIGRATION_003 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_003</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>003</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#324-360">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_003: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Recreate user_data table without foreign key constraint on item_id
|
||||
-- This allows tracking playback progress for items that haven't been synced locally yet
|
||||
|
||||
CREATE TABLE IF NOT EXISTS user_data_new (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
item_id TEXT NOT NULL, -- No foreign key constraint - item may not be synced yet
|
||||
|
||||
-- Playback state
|
||||
playback_position_ticks INTEGER DEFAULT 0,
|
||||
play_count INTEGER DEFAULT 0,
|
||||
is_played INTEGER DEFAULT 0,
|
||||
is_favorite INTEGER DEFAULT 0,
|
||||
|
||||
-- Timestamps
|
||||
last_played_at TEXT,
|
||||
|
||||
-- Sync status
|
||||
synced_at TEXT,
|
||||
pending_sync INTEGER DEFAULT 0, -- 1 if local changes need sync
|
||||
|
||||
UNIQUE(user_id, item_id)
|
||||
);
|
||||
|
||||
-- Copy existing data
|
||||
INSERT OR IGNORE INTO user_data_new (id, user_id, item_id, playback_position_ticks, play_count, is_played, is_favorite, last_played_at, synced_at, pending_sync)
|
||||
SELECT id, user_id, item_id, playback_position_ticks, play_count, is_played, is_favorite, last_played_at, synced_at, pending_sync FROM user_data;
|
||||
|
||||
-- Drop old table and rename new one
|
||||
DROP TABLE IF EXISTS user_data;
|
||||
ALTER TABLE user_data_new RENAME TO user_data;
|
||||
|
||||
-- Recreate index
|
||||
CREATE INDEX IF NOT EXISTS idx_user_data_user ON user_data(user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_user_data_item ON user_data(item_id);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to relax foreign key constraints on user_data table
|
||||
Allows tracking playback progress for items not yet synced to local database</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to enhance downloads table with priority and bytes_downloaded"><title>MIGRATION_004 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_004</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>004</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#363-374">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_004: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Add priority column for queue ordering
|
||||
ALTER TABLE downloads ADD COLUMN priority INTEGER DEFAULT 0;
|
||||
|
||||
-- Add bytes_downloaded for resume support
|
||||
ALTER TABLE downloads ADD COLUMN bytes_downloaded INTEGER DEFAULT 0;
|
||||
|
||||
-- Create index for efficient queue processing (priority DESC, FIFO within same priority)
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_queue
|
||||
ON downloads(status, priority DESC, queued_at ASC)
|
||||
WHERE status IN ('pending', 'downloading');
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to enhance downloads table with priority and bytes_downloaded</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to relax foreign key constraint on downloads.item_id Allows downloading items that haven’t been synced to local database yet"><title>MIGRATION_005 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_005</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>005</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#378-437">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_005: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Recreate downloads table without foreign key constraint on item_id
|
||||
-- This allows downloading items that haven't been synced locally yet
|
||||
|
||||
CREATE TABLE IF NOT EXISTS downloads_new (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
item_id TEXT NOT NULL, -- No foreign key constraint - item may not be synced yet
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
|
||||
-- File info
|
||||
file_path TEXT NOT NULL,
|
||||
file_size INTEGER,
|
||||
mime_type TEXT,
|
||||
|
||||
-- Download state
|
||||
status TEXT DEFAULT 'pending', -- pending, downloading, completed, failed, paused
|
||||
progress REAL DEFAULT 0, -- 0.0 to 1.0
|
||||
|
||||
-- Transcoding options used
|
||||
bitrate INTEGER,
|
||||
container TEXT,
|
||||
|
||||
-- Timestamps
|
||||
queued_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
started_at TEXT,
|
||||
completed_at TEXT,
|
||||
|
||||
-- Error tracking
|
||||
error_message TEXT,
|
||||
retry_count INTEGER DEFAULT 0,
|
||||
|
||||
-- Priority and progress tracking (from migration 004)
|
||||
priority INTEGER DEFAULT 0,
|
||||
bytes_downloaded INTEGER DEFAULT 0,
|
||||
|
||||
UNIQUE(item_id, user_id)
|
||||
);
|
||||
|
||||
-- Copy existing data
|
||||
INSERT OR IGNORE INTO downloads_new (
|
||||
id, item_id, user_id, file_path, file_size, mime_type, status, progress,
|
||||
bitrate, container, queued_at, started_at, completed_at, error_message,
|
||||
retry_count, priority, bytes_downloaded
|
||||
)
|
||||
SELECT
|
||||
id, item_id, user_id, file_path, file_size, mime_type, status, progress,
|
||||
bitrate, container, queued_at, started_at, completed_at, error_message,
|
||||
retry_count, priority, bytes_downloaded
|
||||
FROM downloads;
|
||||
|
||||
-- Drop old table and rename new one
|
||||
DROP TABLE IF EXISTS downloads;
|
||||
ALTER TABLE downloads_new RENAME TO downloads;
|
||||
|
||||
-- Recreate indexes
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_status ON downloads(status);
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_queue
|
||||
ON downloads(status, priority DESC, queued_at ASC)
|
||||
WHERE status IN ('pending', 'downloading');
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to relax foreign key constraint on downloads.item_id
|
||||
Allows downloading items that haven’t been synced to local database yet</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to store item metadata directly in downloads table This eliminates dependency on items table being synced and fixes UUID display issues"><title>MIGRATION_006 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_006</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>006</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#441-447">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_006: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Add columns to store item metadata directly in downloads
|
||||
-- This ensures correct display even when items aren't synced locally
|
||||
ALTER TABLE downloads ADD COLUMN item_name TEXT;
|
||||
ALTER TABLE downloads ADD COLUMN artist_name TEXT;
|
||||
ALTER TABLE downloads ADD COLUMN album_name TEXT;
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to store item metadata directly in downloads table
|
||||
This eliminates dependency on items table being synced and fixes UUID display issues</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to enhance thumbnail caching with LRU eviction support"><title>MIGRATION_007 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_007</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>007</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#454-493">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_007: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Recreate thumbnails table without foreign key constraint on item_id
|
||||
-- and add LRU eviction support columns
|
||||
CREATE TABLE IF NOT EXISTS thumbnails_new (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
item_id TEXT NOT NULL, -- No foreign key constraint - item may not be synced yet
|
||||
image_type TEXT NOT NULL, -- Primary, Backdrop, Thumb, Logo, etc.
|
||||
image_tag TEXT NOT NULL,
|
||||
file_path TEXT NOT NULL,
|
||||
width INTEGER,
|
||||
height INTEGER,
|
||||
file_size INTEGER DEFAULT 0, -- Size in bytes for cache limit tracking
|
||||
cached_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
last_accessed TEXT DEFAULT CURRENT_TIMESTAMP, -- For LRU eviction
|
||||
UNIQUE(item_id, image_type, image_tag)
|
||||
);
|
||||
|
||||
-- Copy existing data (if any)
|
||||
INSERT OR IGNORE INTO thumbnails_new (id, item_id, image_type, image_tag, file_path, width, height, cached_at)
|
||||
SELECT id, item_id, image_type, image_tag, file_path, width, height, cached_at FROM thumbnails;
|
||||
|
||||
-- Drop old table and rename new one
|
||||
DROP TABLE IF EXISTS thumbnails;
|
||||
ALTER TABLE thumbnails_new RENAME TO thumbnails;
|
||||
|
||||
-- Create indexes for efficient queries
|
||||
CREATE INDEX IF NOT EXISTS idx_thumbnails_item ON thumbnails(item_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_thumbnails_lru ON thumbnails(last_accessed ASC);
|
||||
|
||||
-- Cache settings table for configurable limits
|
||||
CREATE TABLE IF NOT EXISTS cache_settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL,
|
||||
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Insert default settings
|
||||
INSERT OR IGNORE INTO cache_settings (key, value) VALUES ('image_cache_limit_bytes', '1073741824'); -- 1GB default
|
||||
INSERT OR IGNORE INTO cache_settings (key, value) VALUES ('image_cache_enabled', 'true');
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to enhance thumbnail caching with LRU eviction support</p>
|
||||
<ul>
|
||||
<li>Relaxes foreign key constraint on item_id (allows caching for items not yet synced)</li>
|
||||
<li>Adds last_accessed for LRU eviction</li>
|
||||
<li>Adds file_size for cache limit tracking</li>
|
||||
<li>Creates cache_settings table for configurable limits</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add video download support and item pinning"><title>MIGRATION_008 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_008</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>008</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#499-520">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_008: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Add video-specific metadata columns to downloads
|
||||
ALTER TABLE downloads ADD COLUMN series_name TEXT;
|
||||
ALTER TABLE downloads ADD COLUMN season_name TEXT;
|
||||
ALTER TABLE downloads ADD COLUMN episode_number INTEGER;
|
||||
ALTER TABLE downloads ADD COLUMN season_number INTEGER;
|
||||
ALTER TABLE downloads ADD COLUMN quality_preset TEXT DEFAULT 'original';
|
||||
ALTER TABLE downloads ADD COLUMN media_type TEXT DEFAULT 'audio';
|
||||
|
||||
-- Add pinning support to items table
|
||||
-- Pinned items are protected from cache clear operations
|
||||
ALTER TABLE items ADD COLUMN is_pinned INTEGER DEFAULT 0;
|
||||
|
||||
-- Index for efficiently finding pinned items
|
||||
CREATE INDEX IF NOT EXISTS idx_items_pinned ON items(is_pinned) WHERE is_pinned = 1;
|
||||
|
||||
-- Index for efficiently querying downloads by series
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_series ON downloads(series_name) WHERE series_name IS NOT NULL;
|
||||
|
||||
-- Index for filtering by media type
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_media_type ON downloads(media_type);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add video download support and item pinning</p>
|
||||
<ul>
|
||||
<li>Adds video-specific metadata columns to downloads (series/episode info, quality preset)</li>
|
||||
<li>Adds media_type to distinguish audio vs video downloads</li>
|
||||
<li>Adds is_pinned column to items table for protecting metadata from cache clear</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add people/cast caching support"><title>MIGRATION_009 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_009</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>009</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#526-560">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_009: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- People table for caching cast/crew members
|
||||
CREATE TABLE IF NOT EXISTS people (
|
||||
id TEXT PRIMARY KEY,
|
||||
server_id TEXT NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
overview TEXT,
|
||||
primary_image_tag TEXT,
|
||||
premiere_date TEXT, -- Birth date
|
||||
end_date TEXT, -- Death date
|
||||
synced_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(server_id, id)
|
||||
);
|
||||
|
||||
-- Item-Person association table (many-to-many)
|
||||
-- Stores which people appear in which items, along with role info
|
||||
CREATE TABLE IF NOT EXISTS item_people (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
item_id TEXT NOT NULL,
|
||||
person_id TEXT NOT NULL,
|
||||
server_id TEXT NOT NULL,
|
||||
person_type TEXT NOT NULL, -- Actor, Director, Writer, Producer, Composer, etc.
|
||||
role TEXT, -- Character name for actors
|
||||
sort_order INTEGER DEFAULT 0,
|
||||
synced_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(item_id, person_id, person_type)
|
||||
);
|
||||
|
||||
-- Indexes for efficient queries
|
||||
CREATE INDEX IF NOT EXISTS idx_people_server ON people(server_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_people_name ON people(name);
|
||||
CREATE INDEX IF NOT EXISTS idx_item_people_item ON item_people(item_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_item_people_person ON item_people(person_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_item_people_type ON item_people(person_type);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add people/cast caching support</p>
|
||||
<ul>
|
||||
<li>Creates people table for caching actor/director/writer/etc info</li>
|
||||
<li>Creates item_people junction table for many-to-many relationships</li>
|
||||
<li>Adds indexes for efficient queries</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add playback context tracking"><title>MIGRATION_010 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_010</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>010</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#566-576">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_010: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Add playback context tracking to user_data
|
||||
-- Tracks whether user played a container (album/playlist) or single item
|
||||
ALTER TABLE user_data ADD COLUMN playback_context_type TEXT;
|
||||
ALTER TABLE user_data ADD COLUMN playback_context_id TEXT;
|
||||
|
||||
-- Index for efficient recently played queries
|
||||
CREATE INDEX IF NOT EXISTS idx_user_data_last_played
|
||||
ON user_data(user_id, last_played_at DESC)
|
||||
WHERE last_played_at IS NOT NULL;
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add playback context tracking</p>
|
||||
<ul>
|
||||
<li>Adds playback_context_type column to track if user played a container or single item</li>
|
||||
<li>Adds playback_context_id column to store the container ID (album/playlist)</li>
|
||||
<li>Adds index for efficient recently played queries</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add user-specific player settings"><title>MIGRATION_011 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_011</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>011</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#583-604">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_011: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- User-specific player settings (autoplay and audio settings)
|
||||
-- Sleep timer is NOT persisted here (maintained in-memory only)
|
||||
CREATE TABLE IF NOT EXISTS user_player_settings (
|
||||
user_id TEXT PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
|
||||
|
||||
-- Autoplay settings
|
||||
autoplay_next_episode INTEGER DEFAULT 1, -- 1 = enabled, 0 = disabled
|
||||
autoplay_countdown_seconds INTEGER DEFAULT 10, -- 5-30 seconds
|
||||
|
||||
-- Audio settings (crossfade, normalization)
|
||||
crossfade_duration REAL DEFAULT 0.0, -- 0-12 seconds
|
||||
gapless_playback INTEGER DEFAULT 1,
|
||||
normalize_volume INTEGER DEFAULT 0,
|
||||
volume_level TEXT DEFAULT 'normal', -- 'loud', 'normal', 'quiet'
|
||||
|
||||
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Index for efficient user settings lookup
|
||||
CREATE INDEX IF NOT EXISTS idx_user_player_settings_user ON user_player_settings(user_id);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add user-specific player settings</p>
|
||||
<ul>
|
||||
<li>Creates user_player_settings table for autoplay and audio preferences</li>
|
||||
<li>Note: Sleep timer state is NOT persisted (cancelled on app close)</li>
|
||||
<li>Autoplay settings control next episode behavior</li>
|
||||
<li>Audio settings for crossfade, gapless playback, and volume normalization</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to track download source (user-initiated vs auto-cached)"><title>MIGRATION_012 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_012</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>012</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#609-616">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_012: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Add download source tracking
|
||||
-- Values: 'user' (explicit download), 'auto' (smart cache/queue precache)
|
||||
ALTER TABLE downloads ADD COLUMN download_source TEXT DEFAULT 'user';
|
||||
|
||||
-- Index for filtering by source
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_source ON downloads(download_source);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to track download source (user-initiated vs auto-cached)</p>
|
||||
<ul>
|
||||
<li>Adds download_source column to distinguish manual downloads from auto-caching</li>
|
||||
<li>Enables color-coded UI display</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add composite index for offline mode filtering"><title>MIGRATION_013 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_013</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>013</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#621-625">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_013: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Add composite index for offline mode filtering
|
||||
-- This speeds up queries that join items with downloads to show only downloaded content
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_item_status ON downloads(item_id, status);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add composite index for offline mode filtering</p>
|
||||
<ul>
|
||||
<li>Adds index on (item_id, status) for efficient JOIN queries in OfflineRepository</li>
|
||||
<li>Significantly improves performance when filtering items by download status</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add series audio track preferences"><title>MIGRATION_014 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_014</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>014</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#631-652">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_014: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Series-specific audio track preferences
|
||||
-- When user changes audio track for an episode, remember preference for the series
|
||||
CREATE TABLE IF NOT EXISTS series_audio_preferences (
|
||||
user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
series_id TEXT NOT NULL,
|
||||
server_id TEXT NOT NULL,
|
||||
|
||||
-- Audio track info for matching across episodes
|
||||
audio_track_display_title TEXT,
|
||||
audio_track_language TEXT,
|
||||
audio_track_index INTEGER,
|
||||
|
||||
updated_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
PRIMARY KEY (user_id, series_id, server_id)
|
||||
);
|
||||
|
||||
-- Index for efficient lookups
|
||||
CREATE INDEX IF NOT EXISTS idx_series_audio_prefs_user_series
|
||||
ON series_audio_preferences(user_id, series_id);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add series audio track preferences</p>
|
||||
<ul>
|
||||
<li>Stores user’s preferred audio track per series</li>
|
||||
<li>Matches tracks by display title and language across episodes</li>
|
||||
<li>Falls back to default track if preferred track not found</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add device ID storage"><title>MIGRATION_015 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_015</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>015</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#657-669">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_015: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- App-wide settings table for device ID and other app-level configuration
|
||||
-- Device ID is a unique identifier for this app installation
|
||||
-- Required for Jellyfin server communication and session tracking
|
||||
CREATE TABLE IF NOT EXISTS app_settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT NOT NULL,
|
||||
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Create index for efficient lookups (though key is already primary key)
|
||||
CREATE INDEX IF NOT EXISTS idx_app_settings_key ON app_settings(key);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add device ID storage</p>
|
||||
<ul>
|
||||
<li>Creates app_settings table for app-wide configuration (device ID, etc.)</li>
|
||||
<li>Device ID is generated once and persisted for Jellyfin server identification</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to add autoplay episode limit setting"><title>MIGRATION_016 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_016</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>016</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#674-677">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_016: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
ALTER TABLE user_player_settings
|
||||
ADD COLUMN autoplay_max_episodes INTEGER DEFAULT 0;
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to add autoplay episode limit setting</p>
|
||||
<ul>
|
||||
<li>Adds autoplay_max_episodes column to user_player_settings</li>
|
||||
<li>0 = unlimited (default), any positive value limits consecutive auto-plays</li>
|
||||
</ul>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to persist the resolved stream URL and target directory on each download row. This lets the backend queue pump start a pending download by itself (replaying the stored URL) once a concurrency slot frees up, instead of relying on the frontend to re-issue every queued item."><title>MIGRATION_017 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_017</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>017</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#683-689">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_017: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
-- Resolved download source URL and on-disk target directory, captured when the
|
||||
-- download is enqueued. Nullable: pre-existing rows and rows enqueued without a
|
||||
-- URL simply won't be auto-started by the pump.
|
||||
ALTER TABLE downloads ADD COLUMN stream_url TEXT;
|
||||
ALTER TABLE downloads ADD COLUMN target_dir TEXT;
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to persist the resolved stream URL and target directory on each
|
||||
download row. This lets the backend queue pump start a pending download by
|
||||
itself (replaying the stored URL) once a concurrency slot frees up, instead
|
||||
of relying on the frontend to re-issue every queued item.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to record whether a cached item is a folder/container vs a playable leaf. Needed so channel items (which can be either) route to the player or to a browse list correctly. Existing cached rows predate the column and have an unknown folder flag, so we force a refresh by clearing their `synced_at`, causing the hybrid repository to re-fetch them from the server on next browse."><title>MIGRATION_018 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_018</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>018</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#696-701">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_018: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
ALTER TABLE items ADD COLUMN is_folder INTEGER DEFAULT 0;
|
||||
|
||||
-- Force re-fetch of all cached items so is_folder is populated from the server.
|
||||
UPDATE items SET synced_at = NULL;
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to record whether a cached item is a folder/container vs a playable
|
||||
leaf. Needed so channel items (which can be either) route to the player or to
|
||||
a browse list correctly. Existing cached rows predate the column and have an
|
||||
unknown folder flag, so we force a refresh by clearing their <code>synced_at</code>,
|
||||
causing the hybrid repository to re-fetch them from the server on next browse.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to cache the full server genre catalog. Previously genres were derived on the fly from cached albums, which meant offline (and the hybrid cache-first race) only ever saw genres for the handful of locally-cached albums — collapsing the variety on the music/TV/movie landing pages. This table stores the complete genre list per library so offline has the real catalog and cache-first routing returns the right thing."><title>MIGRATION_019 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_019</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>019</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#709-721">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_019: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
CREATE TABLE IF NOT EXISTS genres (
|
||||
id TEXT NOT NULL,
|
||||
server_id TEXT NOT NULL,
|
||||
library_id TEXT,
|
||||
name TEXT NOT NULL,
|
||||
album_count INTEGER,
|
||||
synced_at TEXT DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (server_id, library_id, name)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_genres_scope ON genres(server_id, library_id);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to cache the full server genre catalog. Previously genres were
|
||||
derived on the fly from cached albums, which meant offline (and the hybrid
|
||||
cache-first race) only ever saw genres for the handful of locally-cached
|
||||
albums — collapsing the variety on the music/TV/movie landing pages. This
|
||||
table stores the complete genre list per library so offline has the real
|
||||
catalog and cache-first routing returns the right thing.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Migration to index `items.season_id`."><title>MIGRATION_020 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_020</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>020</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#731-733">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_020: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
CREATE INDEX IF NOT EXISTS idx_items_season ON items(season_id);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Migration to index <code>items.season_id</code>.</p>
|
||||
<p>Episodes link to their season via <code>season_id</code> (parent_id is NULL in the
|
||||
cache). The container-rollup queries used by the Downloaded browse and the
|
||||
disk-usage aggregation join <code>children.season_id = c.id</code>, which without this
|
||||
index degrades to an unindexable scan — a large synced catalog then makes
|
||||
the Downloaded page hang (“Loading your downloads…”). <code>parent_id</code>,
|
||||
<code>album_id</code>, and <code>series_id</code> were already indexed; this closes the gap.</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Discard and rebuild the FTS index from the `items` table."><title>MIGRATION_021 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_021</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>021</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#758-760">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_021: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
INSERT INTO items_fts(items_fts) VALUES('rebuild');
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Discard and rebuild the FTS index from the <code>items</code> table.</p>
|
||||
<p>Until DR-110, <code>save_to_cache</code> used <code>INSERT OR REPLACE INTO items</code>. REPLACE
|
||||
deletes the conflicting row and inserts a new one, but SQLite only fires
|
||||
<code>AFTER DELETE</code> triggers on that implicit delete when <code>recursive_triggers</code> is
|
||||
enabled — it is not (storage/mod.rs sets only <code>foreign_keys</code> and
|
||||
<code>journal_mode</code>), so <code>items_ad</code> never ran and the old index row was orphaned.
|
||||
Worse, <code>items.id</code> is a <code>TEXT PRIMARY KEY</code>, so the replacement row also took a
|
||||
<em>fresh rowid</em> and <code>items_ai</code> appended a second entry. Every catalog pass
|
||||
therefore left another duplicate behind, and existing installs carry one
|
||||
stale entry per item per sync since the database was created.</p>
|
||||
<p>This was invisible in results — the <code>JOIN items_fts fts ON fts.rowid = i.rowid</code> drops rowids that no longer exist — but it degrades <code>MATCH</code>
|
||||
permanently, and it becomes a <em>correctness</em> problem the moment rowids are
|
||||
freed and reused: a new item landing on a freed rowid inherits the orphan’s
|
||||
index entry and matches queries for the deleted item’s title. The DR-110
|
||||
deletion sweep frees rowids, so this rebuild must run before it.</p>
|
||||
<p><code>'rebuild'</code> is the FTS5 command for exactly this: it truncates the index and
|
||||
repopulates it from the external content table.</p>
|
||||
<p>TRACES: UR-065 | DR-110</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Full-text index over `people`, mirroring `items_fts`."><title>MIGRATION_022 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_022</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>022</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#770-797">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_022: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
CREATE VIRTUAL TABLE IF NOT EXISTS people_fts USING fts5(
|
||||
name,
|
||||
overview,
|
||||
content='people',
|
||||
content_rowid='rowid'
|
||||
);
|
||||
|
||||
CREATE TRIGGER IF NOT EXISTS people_ai AFTER INSERT ON people BEGIN
|
||||
INSERT INTO people_fts(rowid, name, overview)
|
||||
VALUES (new.rowid, new.name, new.overview);
|
||||
END;
|
||||
|
||||
CREATE TRIGGER IF NOT EXISTS people_ad AFTER DELETE ON people BEGIN
|
||||
INSERT INTO people_fts(people_fts, rowid, name, overview)
|
||||
VALUES('delete', old.rowid, old.name, old.overview);
|
||||
END;
|
||||
|
||||
CREATE TRIGGER IF NOT EXISTS people_au AFTER UPDATE ON people BEGIN
|
||||
INSERT INTO people_fts(people_fts, rowid, name, overview)
|
||||
VALUES('delete', old.rowid, old.name, old.overview);
|
||||
INSERT INTO people_fts(rowid, name, overview)
|
||||
VALUES (new.rowid, new.name, new.overview);
|
||||
END;
|
||||
|
||||
-- Backfill for rows cached before this index existed.
|
||||
INSERT INTO people_fts(people_fts) VALUES('rebuild');
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Full-text index over <code>people</code>, mirroring <code>items_fts</code>.</p>
|
||||
<p>People live in their own table (migration 009) rather than in <code>items</code>, and
|
||||
had no FTS index at all — so the People group UR-060 requires could only ever
|
||||
be filled by the server leg of search. With the local index now answering
|
||||
first, an actor’s name has to be findable offline too.</p>
|
||||
<p>TRACES: UR-065, UR-060 | DR-111</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Give temporary downloads a life limit."><title>MIGRATION_023 in jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc constant"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">MIGRATION_023</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><div id="rustdoc-modnav"><h2><a href="index.html">In jellytau_<wbr>lib::<wbr>storage::<wbr>schema</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a>::<wbr><a href="index.html">schema</a></div><h1>Constant <span class="constant">MIGRATION_<wbr>023</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#814-821">Source</a> </span></div><pre class="rust item-decl"><code>const MIGRATION_023: &<a class="primitive" href="https://doc.rust-lang.org/1.97.1/std/primitive.str.html">str</a> = r#"
|
||||
ALTER TABLE downloads ADD COLUMN expires_at TEXT;
|
||||
|
||||
-- Reclaim scans filter on expiry among 'auto' rows; index both so the sweep
|
||||
-- stays cheap as the cache tier grows.
|
||||
CREATE INDEX IF NOT EXISTS idx_downloads_expiry
|
||||
ON downloads(download_source, expires_at);
|
||||
"#;</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Give temporary downloads a life limit.</p>
|
||||
<p>A cache entry is not a different kind of object from a download — it is a
|
||||
download with a shorter life. Modelling it as one <code>downloads</code> row with an
|
||||
expiry (rather than a parallel cache store) means there is a single storage
|
||||
accounting, a single eviction path, and no way for a cache and a download
|
||||
library to disagree about what is on disk.</p>
|
||||
<p><code>expires_at</code> is NULL for permanent rows, which is every row that exists
|
||||
today: <code>download_source</code> defaults to <code>'user'</code>, and a user’s own download
|
||||
never expires. Only <code>'auto'</code> rows get a timestamp, and they are reclaimed by
|
||||
whichever comes first — the expiry passing, or LRU eviction under space
|
||||
pressure (DR-126).</p>
|
||||
<p>TRACES: UR-071 | DR-127</p>
|
||||
</div></details></section></div></main></body></html>
|
||||
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Database schema and migrations"><title>jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module schema</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module schema</a></h2><h3><a href="#constants">Module Items</a></h3><ul class="block"><li><a href="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In jellytau_<wbr>lib::<wbr>storage</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a></div><h1>Module <span>schema</span> <button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#1-821">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Database schema and migrations</p>
|
||||
<p>TRACES: UR-002 | DR-012 | IR-013</p>
|
||||
</div></details><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.MIGRATIONS.html" title="constant jellytau_lib::storage::schema::MIGRATIONS">MIGRATIONS</a></dt><dd>List of migrations to apply in order.
|
||||
Each migration is a tuple of (name, sql).</dd><dt><a class="constant" href="constant.MIGRATION_001.html" title="constant jellytau_lib::storage::schema::MIGRATION_001">MIGRATION_<wbr>001</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Initial schema migration</dd><dt><a class="constant" href="constant.MIGRATION_002.html" title="constant jellytau_lib::storage::schema::MIGRATION_002">MIGRATION_<wbr>002</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to remove access_token column from users table
|
||||
Tokens are now stored in the system keyring (or encrypted file fallback)</dd><dt><a class="constant" href="constant.MIGRATION_003.html" title="constant jellytau_lib::storage::schema::MIGRATION_003">MIGRATION_<wbr>003</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to relax foreign key constraints on user_data table
|
||||
Allows tracking playback progress for items not yet synced to local database</dd><dt><a class="constant" href="constant.MIGRATION_004.html" title="constant jellytau_lib::storage::schema::MIGRATION_004">MIGRATION_<wbr>004</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to enhance downloads table with priority and bytes_downloaded</dd><dt><a class="constant" href="constant.MIGRATION_005.html" title="constant jellytau_lib::storage::schema::MIGRATION_005">MIGRATION_<wbr>005</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to relax foreign key constraint on downloads.item_id
|
||||
Allows downloading items that haven’t been synced to local database yet</dd><dt><a class="constant" href="constant.MIGRATION_006.html" title="constant jellytau_lib::storage::schema::MIGRATION_006">MIGRATION_<wbr>006</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to store item metadata directly in downloads table
|
||||
This eliminates dependency on items table being synced and fixes UUID display issues</dd><dt><a class="constant" href="constant.MIGRATION_007.html" title="constant jellytau_lib::storage::schema::MIGRATION_007">MIGRATION_<wbr>007</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to enhance thumbnail caching with LRU eviction support</dd><dt><a class="constant" href="constant.MIGRATION_008.html" title="constant jellytau_lib::storage::schema::MIGRATION_008">MIGRATION_<wbr>008</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add video download support and item pinning</dd><dt><a class="constant" href="constant.MIGRATION_009.html" title="constant jellytau_lib::storage::schema::MIGRATION_009">MIGRATION_<wbr>009</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add people/cast caching support</dd><dt><a class="constant" href="constant.MIGRATION_010.html" title="constant jellytau_lib::storage::schema::MIGRATION_010">MIGRATION_<wbr>010</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add playback context tracking</dd><dt><a class="constant" href="constant.MIGRATION_011.html" title="constant jellytau_lib::storage::schema::MIGRATION_011">MIGRATION_<wbr>011</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add user-specific player settings</dd><dt><a class="constant" href="constant.MIGRATION_012.html" title="constant jellytau_lib::storage::schema::MIGRATION_012">MIGRATION_<wbr>012</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to track download source (user-initiated vs auto-cached)</dd><dt><a class="constant" href="constant.MIGRATION_013.html" title="constant jellytau_lib::storage::schema::MIGRATION_013">MIGRATION_<wbr>013</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add composite index for offline mode filtering</dd><dt><a class="constant" href="constant.MIGRATION_014.html" title="constant jellytau_lib::storage::schema::MIGRATION_014">MIGRATION_<wbr>014</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add series audio track preferences</dd><dt><a class="constant" href="constant.MIGRATION_015.html" title="constant jellytau_lib::storage::schema::MIGRATION_015">MIGRATION_<wbr>015</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add device ID storage</dd><dt><a class="constant" href="constant.MIGRATION_016.html" title="constant jellytau_lib::storage::schema::MIGRATION_016">MIGRATION_<wbr>016</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to add autoplay episode limit setting</dd><dt><a class="constant" href="constant.MIGRATION_017.html" title="constant jellytau_lib::storage::schema::MIGRATION_017">MIGRATION_<wbr>017</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to persist the resolved stream URL and target directory on each
|
||||
download row. This lets the backend queue pump start a pending download by
|
||||
itself (replaying the stored URL) once a concurrency slot frees up, instead
|
||||
of relying on the frontend to re-issue every queued item.</dd><dt><a class="constant" href="constant.MIGRATION_018.html" title="constant jellytau_lib::storage::schema::MIGRATION_018">MIGRATION_<wbr>018</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to record whether a cached item is a folder/container vs a playable
|
||||
leaf. Needed so channel items (which can be either) route to the player or to
|
||||
a browse list correctly. Existing cached rows predate the column and have an
|
||||
unknown folder flag, so we force a refresh by clearing their <code>synced_at</code>,
|
||||
causing the hybrid repository to re-fetch them from the server on next browse.</dd><dt><a class="constant" href="constant.MIGRATION_019.html" title="constant jellytau_lib::storage::schema::MIGRATION_019">MIGRATION_<wbr>019</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to cache the full server genre catalog. Previously genres were
|
||||
derived on the fly from cached albums, which meant offline (and the hybrid
|
||||
cache-first race) only ever saw genres for the handful of locally-cached
|
||||
albums — collapsing the variety on the music/TV/movie landing pages. This
|
||||
table stores the complete genre list per library so offline has the real
|
||||
catalog and cache-first routing returns the right thing.</dd><dt><a class="constant" href="constant.MIGRATION_020.html" title="constant jellytau_lib::storage::schema::MIGRATION_020">MIGRATION_<wbr>020</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Migration to index <code>items.season_id</code>.</dd><dt><a class="constant" href="constant.MIGRATION_021.html" title="constant jellytau_lib::storage::schema::MIGRATION_021">MIGRATION_<wbr>021</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Discard and rebuild the FTS index from the <code>items</code> table.</dd><dt><a class="constant" href="constant.MIGRATION_022.html" title="constant jellytau_lib::storage::schema::MIGRATION_022">MIGRATION_<wbr>022</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Full-text index over <code>people</code>, mirroring <code>items_fts</code>.</dd><dt><a class="constant" href="constant.MIGRATION_023.html" title="constant jellytau_lib::storage::schema::MIGRATION_023">MIGRATION_<wbr>023</a><span title="Restricted Visibility"> 🔒</span> </dt><dd>Give temporary downloads a life limit.</dd></dl></section></div></main></body></html>
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"constant":["MIGRATIONS","MIGRATION_001","MIGRATION_002","MIGRATION_003","MIGRATION_004","MIGRATION_005","MIGRATION_006","MIGRATION_007","MIGRATION_008","MIGRATION_009","MIGRATION_010","MIGRATION_011","MIGRATION_012","MIGRATION_013","MIGRATION_014","MIGRATION_015","MIGRATION_016","MIGRATION_017","MIGRATION_018","MIGRATION_019","MIGRATION_020","MIGRATION_021","MIGRATION_022","MIGRATION_023"]};
|
||||
@@ -0,0 +1 @@
|
||||
window.SIDEBAR_ITEMS = {"mod":["db_service","models","schema"],"struct":["Database"]};
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user