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

Method rows_affected

src/executor/execute.rs:65–80  ·  view source on GitHub ↗

Get the number of rows affected by the operation

(&self)

Source from the content-addressed store, hash-verified

63
64 /// Get the number of rows affected by the operation
65 pub fn rows_affected(&self) -> u64 {
66 match &self.result {
67 #[cfg(feature = "sqlx-mysql")]
68 ExecResultHolder::SqlxMySql(result) => result.rows_affected(),
69 #[cfg(feature = "sqlx-postgres")]
70 ExecResultHolder::SqlxPostgres(result) => result.rows_affected(),
71 #[cfg(feature = "sqlx-sqlite")]
72 ExecResultHolder::SqlxSqlite(result) => result.rows_affected(),
73 #[cfg(feature = "mock")]
74 ExecResultHolder::Mock(result) => result.rows_affected,
75 #[cfg(feature = "proxy")]
76 ExecResultHolder::Proxy(result) => result.rows_affected,
77 #[allow(unreachable_patterns)]
78 _ => unreachable!(),
79 }
80 }
81}

Callers 5

fromMethod · 0.80
execMethod · 0.80
exec_insertFunction · 0.80
exec_deleteFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected