Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for BeginTransaction (0.1 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. callbacks/transaction.go

    package callbacks
    
    import (
    	"gorm.io/gorm"
    )
    
    func BeginTransaction(db *gorm.DB) {
    	if !db.Config.SkipDefaultTransaction && db.Error == nil {
    		if tx := db.Begin(); tx.Error == nil {
    			db.Statement.ConnPool = tx.Statement.ConnPool
    			db.InstanceSet("gorm:started_transaction", true)
    		} else if tx.Error == gorm.ErrInvalidTransaction {
    			tx.Error = nil
    		} else {
    			db.Error = tx.Error
    		}
    	}
    }
    
    Created: Sun Dec 28 09:35:17 GMT 2025
    - Last Modified: Mon Nov 29 01:33:20 GMT 2021
    - 675 bytes
    - Click Count (0)
Back to Top