Return the string representation of a transaction isolation level.
(&self)
| 536 | impl TransactionIsolationLevel { |
| 537 | /// Return the string representation of a transaction isolation level. |
| 538 | fn as_str(&self) -> &'static str { |
| 539 | match self { |
| 540 | TransactionIsolationLevel::ReadUncommitted => "READ UNCOMMITTED", |
| 541 | TransactionIsolationLevel::ReadCommitted => "READ COMMITTED", |
| 542 | TransactionIsolationLevel::RepeatableRead => "REPEATABLE READ", |
| 543 | TransactionIsolationLevel::Snapshot => "SNAPSHOT", |
| 544 | TransactionIsolationLevel::Serializable => "SERIALIZABLE", |
| 545 | } |
| 546 | } |
| 547 | |
| 548 | /// Try to parse a [`TransactionIsolationLevel`] from the value returned from SQL Server. |
| 549 | fn try_from_sql_server(val: i16) -> Result<TransactionIsolationLevel, anyhow::Error> { |
no outgoing calls