sem-core 0.3.21

Entity-level semantic diff engine. Extracts functions, classes, and methods from 20 languages via tree-sitter and diffs at the entity level.
Documentation
pub struct Connection {
    pub active: bool,
}

impl Connection {
    pub fn execute(&self, query: &str) -> Vec<String> {
        Vec::new()
    }

    pub fn commit(&self) {}

    pub fn close(&mut self) {
        self.active = false;
    }
}

pub struct Transaction {
    pub conn: Connection,
}

impl Transaction {
    pub fn new(conn: Connection) -> Transaction {
        Transaction { conn }
    }

    pub fn execute(&self, query: &str) -> Vec<String> {
        self.conn.execute(query)
    }

    pub fn commit(&self) {
        self.conn.commit()
    }

    pub fn rollback(&self) {}
}

pub fn get_connection() -> Connection {
    Connection { active: true }
}