docs: publish site from 73fd8a1d

This commit is contained in:
gitea-actions
2026-09-24 04:18:56 +00:00
commit 96736205c9
1830 changed files with 193912 additions and 0 deletions
@@ -0,0 +1,23 @@
<!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: the single owner of the SQLite database."><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.13.2</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>&nbsp;<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-627">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Database service: the single owner of the SQLite database.</p>
<p>Every query in the app goes through <a href="struct.RusqliteService.html" title="struct jellytau_lib::storage::db_service::RusqliteService"><code>RusqliteService</code></a>, which owns the
connections and hands work to them — callers never touch a <code>Connection</code>.</p>
<ul>
<li><strong>Writes</strong> (<code>execute</code>, <code>insert</code>, <code>transaction</code>, …) are sent as jobs to one
dedicated writer thread that owns the read-write connection. SQLite allows
one writer at a time anyway; owning it on one thread makes that explicit,
keeps connection-wide state (pragmas) out of reach of concurrent callers,
and parks no tokio blocking threads on a mutex while writes queue up.</li>
<li><strong>Reads</strong> (<code>query_*</code>) run on a small pool of read-only connections. The
database is in WAL mode, so readers see the last committed state and never
wait for the writer — a large catalog-cache transaction no longer stalls
library pages, thumbnail lookups or settings reads.</li>
</ul>
<p>A service built with <a href="struct.RusqliteService.html#method.new" title="associated function jellytau_lib::storage::db_service::RusqliteService::new"><code>RusqliteService::new</code></a> has no reader pool (in-memory
databases cannot be shared between connections) and routes reads through
the writer, which is the old single-connection behaviour tests rely on.</p>
<p>See <code>docs/architecture/08-database-design.md</code> → “Connection ownership”.</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.Checkout.html" title="struct jellytau_lib::storage::db_service::Checkout">Checkout</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><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.ReaderPool.html" title="struct jellytau_lib::storage::db_service::ReaderPool">Reader<wbr>Pool</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Read-only connections, checked out one per query. WAL gives each a
snapshot of the last commit, so they never wait for the writer.</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: a cheap, cloneable handle to the writer
thread and reader pool. See the module docs.</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><dt><a class="struct" href="struct.Writer.html" title="struct jellytau_lib::storage::db_service::Writer">Writer</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>The thread that owns the read-write connection. Jobs run one at a time, in
the order they were sent; the thread exits when the last service handle
(and so the last sender) is dropped.</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">&nbsp;🔒</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">&nbsp;🔒</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">&nbsp;🔒</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">&nbsp;🔒</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">&nbsp;🔒</span> </dt><dt><a class="fn" href="fn.run_transaction.html" title="fn jellytau_lib::storage::db_service::run_transaction">run_<wbr>transaction</a><span title="Restricted Visibility">&nbsp;🔒</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><dt><a class="type" href="type.Job.html" title="type jellytau_lib::storage::db_service::Job">Job</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt></dl></section></div></main></body></html>