pub async fn account_updates_since(
    index_id: i64,
) -> Result<Vec<(i64, String, String)>, sqlx::Error> {
    let pool = pg_pool().await;

    let updates = sqlx::query(
        r#"
SELECT ati.id, ati.account, sm.summary::text FROM ati
JOIN summaries AS sm ON ati.summary = sm.id
WHERE ati.id > $1 AND ati.account IN (SELECT DISTINCT ON (account) account FROM subscriptions)
ORDER BY ati.id
        "#,
    )
    .bind(index_id)
    .map(|row: PgRow| {
        (
            row.get(0),
            row.get::<&[u8], _>(1).to_base58check(1),
            row.get(2),
        )
    })
    .fetch_all(pool)
    .await?;

    Ok(updates)
}
/// Returns account updates since account transaction index ID.
Returns account updates since account transaction index ID.
Returns account updates since account transaction index ID .
pub async fn account_updates_since(
    index_id: i64,
) -> Result<Vec<(i64, String, String)>, sqlx::Error> {
    let pool = pg_pool().await;
    let updates = sqlx::query(
        r#"
SELECT ati.id, ati.account, sm.summary::text FROM ati
JOIN summaries AS sm ON ati.summary = sm.id
WHERE ati.id > $1 AND ati.account IN (SELECT DISTINCT ON (account) account FROM subscriptions)
ORDER BY ati.id
        "#,
    )
    .bind(index_id)
    .map(|row: PgRow| {
        (
            row.get(0),
            row.get::<&[u8], _>(1).to_base58check(1),
            row.get(2),
        )
    })
    .fetch_all(pool)
    .await?;
    Ok(updates)
}
pub async fn account_updates_since ( index_id : i64 , ) -> Result < Vec < ( i64 , String , String ) > , sqlx :: Error > { let pool = pg_pool ( ) . await ; let updates = sqlx :: query ( r#"
SELECT ati.id, ati.account, sm.summary::text FROM ati
JOIN summaries AS sm ON ati.summary = sm.id
WHERE ati.id > $1 AND ati.account IN (SELECT DISTINCT ON (account) account FROM subscriptions)
ORDER BY ati.id
        "# , ) . bind ( index_id ) . map ( | row : PgRow | { ( row . get ( 0 ) , row . get :: < & [ u8 ] , _ > ( 1 ) . to_base58check ( 1 ) , row . get ( 2 ) , ) } ) . fetch_all ( pool ) . await ? ; Ok ( updates ) }
Returns account updates since account transaction index ID.
Returns account updates since account transaction index ID .
index_id
i64
index_id
i64