MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / print_transaction_statement

Function print_transaction_statement

graphlite/src/ast/pretty_printer.rs:748–805  ·  view source on GitHub ↗
(transaction_stmt: &TransactionStatement, indent: usize)

Source from the content-addressed store, hash-verified

746}
747
748fn print_transaction_statement(transaction_stmt: &TransactionStatement, indent: usize) {
749 match transaction_stmt {
750 TransactionStatement::StartTransaction(start_stmt) => {
751 debug!("{}{}", get_indent(indent), "Start Transaction Statement");
752 if let Some(ref characteristics) = start_stmt.characteristics {
753 debug!("{}Characteristics:", get_indent(indent + 1));
754 if let Some(ref isolation_level) = characteristics.isolation_level {
755 debug!(
756 "{}Isolation Level: {}",
757 get_indent(indent + 2),
758 isolation_level.as_str()
759 );
760 }
761 if let Some(ref access_mode) = characteristics.access_mode {
762 debug!(
763 "{}Access Mode: {}",
764 get_indent(indent + 2),
765 access_mode.as_str()
766 );
767 }
768 }
769 }
770 TransactionStatement::Commit(commit_stmt) => {
771 debug!("{}{}", get_indent(indent), "Commit Statement");
772 if commit_stmt.work {
773 debug!("{}Work: true", get_indent(indent + 1));
774 }
775 }
776 TransactionStatement::Rollback(rollback_stmt) => {
777 debug!("{}{}", get_indent(indent), "Rollback Statement");
778 if rollback_stmt.work {
779 debug!("{}Work: true", get_indent(indent + 1));
780 }
781 }
782 TransactionStatement::SetTransactionCharacteristics(set_stmt) => {
783 debug!(
784 "{}{}",
785 get_indent(indent),
786 "Set Transaction Characteristics Statement"
787 );
788 debug!("{}Characteristics:", get_indent(indent + 1));
789 if let Some(ref isolation_level) = set_stmt.characteristics.isolation_level {
790 debug!(
791 "{}Isolation Level: {}",
792 get_indent(indent + 2),
793 isolation_level.as_str()
794 );
795 }
796 if let Some(ref access_mode) = set_stmt.characteristics.access_mode {
797 debug!(
798 "{}Access Mode: {}",
799 get_indent(indent + 2),
800 access_mode.as_str()
801 );
802 }
803 }
804 }
805}

Callers 1

print_statementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected