//! Storage module for LFG (Looking For Group) records.
//!
//! This module provides query helpers for LFG records stored in the `atproto_records` table.
//! For writes, use `atproto_record_upsert()` and `atproto_record_delete()` from the
//! `atproto_record` module.
//!
//! Records are stored as `AtprotoRecord` and can be deserialized to `Lfg` using:
//! ```ignore
//! let lfg: Lfg = serde_json::from_value(record.record.0.clone())?;
//! ```
use super::StoragePool;
use super::atproto_record::AtprotoRecord;
use super::errors::StorageError;
use crate::atproto::lexicon::lfg::NSID;
/// Get the active LFG record for a DID from atproto_records.
///
/// Returns the most recent active LFG record for the given DID, or None if
/// no active record exists.
pub async fn lfg_get_active_by_did(
pool: &StoragePool,
did: &str,
) -> Result