MCPcopy Create free account
hub / github.com/cowprotocol/services / read_quotes

Function read_quotes

crates/database/src/orders.rs:444–462  ·  view source on GitHub ↗
(
    ex: &mut sqlx::PgConnection,
    order_ids: &[OrderUid],
)

Source from the content-addressed store, hash-verified

442
443#[instrument(skip_all)]
444pub async fn read_quotes(
445 ex: &mut sqlx::PgConnection,
446 order_ids: &[OrderUid],
447) -> Result<Vec<Quote>, sqlx::Error> {
448 if order_ids.is_empty() {
449 return Ok(vec![]);
450 }
451
452 let mut query_builder = QueryBuilder::new("SELECT * FROM order_quotes WHERE order_uid IN (");
453
454 let mut separated = query_builder.separated(", ");
455 for value_type in order_ids {
456 separated.push_bind(value_type);
457 }
458 separated.push_unseparated(") ");
459
460 let query = query_builder.build_query_as();
461 query.fetch_all(ex).await
462}
463
464#[instrument(skip_all)]
465pub async fn cancel_order(

Callers 4

solvable_orders_afterMethod · 0.85
read_quotesMethod · 0.85

Calls 3

fetch_allMethod · 0.80
newFunction · 0.50
is_emptyMethod · 0.45

Tested by

no test coverage detected