MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / as_str

Method as_str

src/sql-server-util/src/lib.rs:538–546  ·  view source on GitHub ↗

Return the string representation of a transaction isolation level.

(&self)

Source from the content-addressed store, hash-verified

536impl 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> {

Callers 5

connectMethod · 0.45
try_fromMethod · 0.45
parse_data_typeFunction · 0.45
try_newMethod · 0.45
is_compatibleMethod · 0.45

Calls

no outgoing calls

Tested by 1

is_compatibleMethod · 0.36