<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>db/ on SAFER Documentation</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/db/</link><description>Recent content in db/ on SAFER Documentation</description><generator>Hugo</generator><language>en</language><atom:link href="https://safer-capstone.pages.dev/developer-docs/api-reference/db/index.xml" rel="self" type="application/rss+xml"/><item><title>db/cpmDb.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/db/cpmdb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/db/cpmdb/</guid><description>&lt;h2 id="purpose"&gt;Purpose&lt;/h2&gt;
&lt;p&gt;This module provides a lightweight persistence layer for storing and querying CPM (cost-per-mile / cost-per-thousand impressions) history using Expo SQLite.&lt;/p&gt;
&lt;p&gt;It is responsible for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Initializing a local SQLite database&lt;/li&gt;
&lt;li&gt;Persisting timestamped CPM values&lt;/li&gt;
&lt;li&gt;Querying recent CPM history&lt;/li&gt;
&lt;li&gt;Enforcing bounded storage retention&lt;/li&gt;
&lt;li&gt;Providing structured logging for database operations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The module is designed to be safe for repeated initialization and concurrent usage across the application lifecycle.&lt;/p&gt;</description></item><item><title>db/debugLogDb.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/db/debuglogdb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/db/debuglogdb/</guid><description>&lt;h2 id="purpose"&gt;Purpose&lt;/h2&gt;
&lt;p&gt;This module provides a persistent local logging system using Expo SQLite.&lt;/p&gt;
&lt;p&gt;It is intended for development and diagnostics in environments where standard console access is unavailable, especially:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;background tasks&lt;/li&gt;
&lt;li&gt;suspended app execution&lt;/li&gt;
&lt;li&gt;device testing without Xcode/ADB attached&lt;/li&gt;
&lt;li&gt;production-adjacent debugging&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The module stores structured debug logs in SQLite and automatically initializes itself on first use.&lt;/p&gt;</description></item><item><title>db/sensorHistoryDb.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/db/sensorhistorydb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/db/sensorhistorydb/</guid><description>&lt;h2 id="purpose"&gt;Purpose&lt;/h2&gt;
&lt;p&gt;This module provides persistent local storage for historical core temperature sensor readings using Expo SQLite.&lt;/p&gt;
&lt;p&gt;It is designed to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;record timestamped temperature samples&lt;/li&gt;
&lt;li&gt;retain recent history within a fixed time window&lt;/li&gt;
&lt;li&gt;support historical trend analysis&lt;/li&gt;
&lt;li&gt;provide efficient local persistence for sensor telemetry&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The module uses a lightweight SQLite-backed rolling history store optimized for append-heavy workloads.&lt;/p&gt;</description></item><item><title>db/weatherCacheDb.ts</title><link>https://safer-capstone.pages.dev/developer-docs/api-reference/db/weathercachedb/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://safer-capstone.pages.dev/developer-docs/api-reference/db/weathercachedb/</guid><description>&lt;h2 id="purpose"&gt;Purpose&lt;/h2&gt;
&lt;p&gt;This module provides a persistent SQLite-backed weather forecast cache using Expo SQLite.&lt;/p&gt;
&lt;p&gt;It is responsible for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;storing forecast data by grid cell and forecast hour&lt;/li&gt;
&lt;li&gt;validating cached payload integrity&lt;/li&gt;
&lt;li&gt;supporting efficient point lookups&lt;/li&gt;
&lt;li&gt;tracking row access recency&lt;/li&gt;
&lt;li&gt;implementing LRU-based cache eviction&lt;/li&gt;
&lt;li&gt;providing durable offline weather forecast access&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The cache is optimized for repeated forecast reads across spatial cells and hourly forecast windows.&lt;/p&gt;</description></item></channel></rss>