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

Function assert_it

src/entity/column.rs:1124–1139  ·  view source on GitHub ↗
(active_model: A)

Source from the content-addressed store, hash-verified

1122 }
1123
1124 fn assert_it<E, A>(active_model: A)
1125 where
1126 E: EntityTrait,
1127 A: ActiveModelTrait<Entity = E>,
1128 {
1129 assert_eq!(
1130 E::find().build(DbBackend::Postgres).to_string(),
1131 r#"SELECT "hello"."id", "hello"."one1", CAST("hello"."two" AS integer), "hello"."three3" FROM "hello""#,
1132 );
1133 assert_eq!(
1134 Update::one(active_model)
1135 .build(DbBackend::Postgres)
1136 .to_string(),
1137 r#"UPDATE "hello" SET "one1" = 1, "two" = 2, "three3" = 3 WHERE "hello"."id" = 1"#,
1138 );
1139 }
1140
1141 assert_it(hello_expanded::ActiveModel {
1142 id: ActiveValue::set(1),

Callers 3

select_as_1Function · 0.85
save_as_1Function · 0.85
select_as_and_value_1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected