database-operations

Write SQLite CRUD queries and migrations with SQLx in Rivetr.

4|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/KwaminaWhyte/rivetr --skill database-operations-kwaminawhyte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-operations
Source: https://github.com/KwaminaWhyte/rivetr/tree/main/.claude/skills/database-operations
Command: npx skills add https://github.com/KwaminaWhyte/rivetr --skill database-operations-kwaminawhyte

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SQLite patterns and SQLx usage in Rivetr can be non-intuitive; this guide provides clear, reusable patterns to help developers write robust queries, debug schema issues, and understand data models.

Core Features & Use Cases

  • Standard CRUD patterns (fetch_one, fetch_optional, fetch_all, insert, update, delete) with SQLite and SQLx.
  • WAL mode guidance, compile-time query verification (when enabled), and a structured migrations approach.
  • Practical examples for common Rivetr data models like apps, deployments, and env_vars.

Quick Start

Use this guide to validate your data access paths with a minimal pool and example data.

Frequently Asked Questions about database-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a SQLite database connection using SQLx in Rivetr?

To set up a SQLite connection using SQLx in Rivetr, configure the connection pool with a SQLite URL and enable WAL mode. This establishes a minimal pool for validating data access paths and managing operations.

What are the standard SQLx patterns for CRUD operations with SQLite?

Standard SQLx patterns for SQLite CRUD operations include using fetch_one, fetch_optional, and fetch_all for queries, alongside insert, update, and delete methods. These patterns ensure robust data access across Rivetr's data models.

How do I handle SQLite schema migrations in Rivetr with SQLx?

SQLite schema migrations in Rivetr are handled using a structured migrations approach provided by SQLx. This guide offers practical examples for managing schema changes across data models like apps, deployments, and env_vars.

Can I use compile-time query verification with SQLx and SQLite?

Yes, you can use compile-time query verification with SQLx and SQLite. When enabled, this feature validates SQL queries against the database schema during compilation, helping catch errors before runtime.

Why am I having issues debugging SQLite schema problems in Rivetr?

Debugging SQLite schema issues in Rivetr often stems from non-intuitive data model patterns. This guide provides clear, reusable SQLx patterns to identify schema mismatches, validate data access paths, and resolve debugging issues.

What is the best way to structure SQLite data models for Rivetr deployments?

The best way to structure SQLite data models for Rivetr deployments is by following the practical examples provided in this guide. It demonstrates standard SQLx patterns for entities like apps, deployments, and env_vars.