use sqlx::PgPool;
use crate::{error::Result, models::BibleVerse};

// Only keep the list function as it's still used by the service
// get_random and search are now handled by BibleVerseOperations in utils/db_operations.rs
pub async fn list(pool: &PgPool) -> Result<Vec<BibleVerse>> {
    let verses = sqlx::query_as!(
        BibleVerse,
        "SELECT * FROM bible_verses WHERE is_active = true ORDER BY reference"
    )
    .fetch_all(pool)
    .await?;

    Ok(verses)
}
