Skip to main content

## Module db_service

Source
Expand description

Database service abstraction layer

This module provides an async database interface that abstracts away the underlying database implementation. This makes it easy to:

- Switch between sync (rusqlite) and async (tokio-rusqlite) implementations
- Prevent blocking the async runtime with synchronous database calls
- Test with different database backends
- Migrate to other database systems in the future

## Structs§

Query
  Represents a database query that can be executed
RusqliteService
  Rusqlite-based database service implementation
Transaction
  Transaction handle for batching multiple operations

## Enums§

QueryParam
  Query parameter types supported by the database

## Traits§

DatabaseService
  Database service trait - abstraction over database operations

## Functions§

convert_params 🔒
  Convert QueryParam to rusqlite::types::Value
execute_query 🔒
query_many 🔒
query_one 🔒
query_optional 🔒

## Type Aliases§

DbResult
  Database query result type