(
ex: &mut PgConnection,
auction_id: AuctionId,
solver: Address,
solution_uid: i64,
start_timestamp: DateTime<Utc>,
start_block: i64,
deadline_block: i64,
)
| 20 | |
| 21 | #[instrument(skip_all)] |
| 22 | pub async fn insert( |
| 23 | ex: &mut PgConnection, |
| 24 | auction_id: AuctionId, |
| 25 | solver: Address, |
| 26 | solution_uid: i64, |
| 27 | start_timestamp: DateTime<Utc>, |
| 28 | start_block: i64, |
| 29 | deadline_block: i64, |
| 30 | ) -> Result<(), sqlx::Error> { |
| 31 | const QUERY: &str = r#" |
| 32 | INSERT INTO settlement_executions (auction_id, solver, solution_uid, start_timestamp, start_block, deadline_block) |
| 33 | VALUES ($1, $2, $3, $4, $5, $6) |
| 34 | ;"#; |
| 35 | |
| 36 | sqlx::query(QUERY) |
| 37 | .bind(auction_id) |
| 38 | .bind(solver) |
| 39 | .bind(solution_uid) |
| 40 | .bind(start_timestamp) |
| 41 | .bind(start_block) |
| 42 | .bind(deadline_block) |
| 43 | .execute(ex) |
| 44 | .await?; |
| 45 | |
| 46 | Ok(()) |
| 47 | } |
| 48 | |
| 49 | #[instrument(skip_all)] |
| 50 | pub async fn update( |
no test coverage detected