Improve this page on GitHub

Transaction

ORM has the basic transaction support

o := NewOrm()
err := o.Begin()
// transaction process
...
...
// All the query which are using o Ormer in this process are in the transaction
if SomeError {
    err = o.Rollback()
} else {
    err = o.Commit()
}
comments powered by Disqus