Skip to content

Commit

Permalink
Correctly handle the multi statement sql file
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Jul 25, 2024
1 parent 0159700 commit 4c87381
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/bin/pindexer/src/dex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ impl AppView for Component {
dbtx: &mut PgTransaction,
_app_state: &serde_json::Value,
) -> anyhow::Result<()> {
sqlx::query(include_str!("dex.sql"))
.execute(dbtx.as_mut())
.await?;
for statement in include_str!("dex.sql").split(";") {
sqlx::query(statement).execute(dbtx.as_mut()).await?;
}
Ok(())
}

Expand Down

0 comments on commit 4c87381

Please sign in to comment.