forgex 0.10.2

CLI and runtime for the Forge full-stack framework
Documentation
// Context API: ctx.db() -> ForgeDb, ctx.user_id()? -> Uuid, ctx.env_or(key, default).
// Private queries MUST filter by user_id or owner_id; opt out with #[forge::query(unscoped)] for shared/admin reads.

use forge::prelude::*;

#[forge::query]
pub async fn {{name}}(ctx: &QueryContext) -> Result<Vec<serde_json::Value>> {
    let user_id = ctx.user_id()?;
    let _ = user_id;

    // TODO: replace with your real query, e.g.
    // let rows = sqlx::query!(
    //     "SELECT id FROM your_table WHERE user_id = $1 ORDER BY id DESC LIMIT 50",
    //     user_id,
    // )
    // .fetch_all(ctx.db())
    // .await?;
    // Ok(rows.into_iter().map(|r| serde_json::json!({ "id": r.id })).collect())

    Ok(Vec::new())
}