def bayesdb_commit_transaction(bdb):
    if bdb.txn_depth != 0:
        raise BayesDBTxnError(bdb, 'Not in a transaction!')
    bdb.sql_execute("COMMIT")
    bdb.txn_depth = 0
    bayesdb_txn_fini(bdb)

# XXX Maintaining a stack of savepoints in BQL is a little more
# trouble than it is worth at the moment, since users can rollback to
# or release any savepoint in the stack, not just the most recent one.
# (For the bdb.savepoint() context manager that is not an issue.)
# We'll implement that later.
dataset/ETHPy150Open probcomp/bayeslite/src/txn.py/bayesdb_commit_transaction/operator `==` -> `!=`