MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / expr

Method expr

src/query/helper.rs:468–474  ·  view source on GitHub ↗

Add an expression to the select expression list. ``` use sea_orm::sea_query::Expr; use sea_orm::{entity::*, tests_cfg::cake, DbBackend, QuerySelect, QueryTrait}; assert_eq!( cake::Entity::find() .select_only() .expr(Expr::col((cake::Entity, cake::Column::Id))) .build(DbBackend::MySql) .to_string(), "SELECT `cake`.`id` FROM `cake`" ); ```

(mut self, expr: T)

Source from the content-addressed store, hash-verified

466 /// );
467 /// ```
468 fn expr<T>(mut self, expr: T) -> Self
469 where
470 T: Into<SelectExpr>,
471 {
472 self.query().expr(expr);
473 self
474 }
475
476 /// Add select expressions from vector of [`SelectExpr`].
477 /// ```

Callers 12

prepare_select_colFunction · 0.80
find_also_linkedMethod · 0.80
find_with_linkedMethod · 0.80
columnMethod · 0.80
column_asMethod · 0.80
num_itemsMethod · 0.80
existsMethod · 0.80
paginateMethod · 0.80
num_pagesFunction · 0.80
num_pages_rawFunction · 0.80
build_with_queryFunction · 0.80
find_linked_recursiveFunction · 0.80

Implementers 1

cursor.rssrc/executor/cursor.rs

Calls 1

queryMethod · 0.45

Tested by 1

build_with_queryFunction · 0.64