qail-core 0.28.0

AST-native query builder - type-safe expressions, zero SQL strings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::ast::*;
use crate::parser::parse;

#[test]
fn test_txn_commands() {
    // V2 transaction syntax
    let cmd = parse("begin").unwrap();
    assert_eq!(cmd.action, Action::TxnStart);

    let cmd = parse("commit").unwrap();
    assert_eq!(cmd.action, Action::TxnCommit);

    let cmd = parse("rollback").unwrap();
    assert_eq!(cmd.action, Action::TxnRollback);
}